def METHOD_NAME(name, runner, **kwargs):
    # Always specify all the npm packages
    args = kwargs.pop("templated_args", []) + ["--package"] + [
        "$(rootpath %s)" % p
        for p in TESTED_PACKAGES
    ]
    # Always add all the npm packages as data
    data = kwargs.pop("data", []) + TESTED_PACKAGES
    # Tags that must always be applied
    tags = kwargs.pop("tags", []) + TEST_TAGS
    # Passthru E2E variables in case it is customized by CI etc
    configuration_env_vars = kwargs.pop("configuration_env_vars", []) + ["E2E_TEMP", "E2E_SHARD_INDEX", "E2E_SHARD_TOTAL"]
    env = kwargs.pop("env", {})
    toolchains = kwargs.pop("toolchains", [])
    # The git toolchain + env
    env.update({"GIT_BIN": "$(GIT_BIN_PATH)"})
    toolchains = toolchains + ["@npm//@angular/build-tooling/bazel/git-toolchain:current_git_toolchain"]
    # Chromium browser toolchain
    env.update({
        "CHROME_BIN": "$(CHROMIUM)",
        "CHROMEDRIVER_BIN": "$(CHROMEDRIVER)",
    })
    toolchains = toolchains + ["@npm//@angular/build-tooling/bazel/browsers/chromium:toolchain_alias"]
    data = data + ["@npm//@angular/build-tooling/bazel/browsers/chromium"]
    nodejs_test(
        name = name,
        templated_args = args,
        data = data,
        entry_point = runner,
        env = env,
        configuration_env_vars = configuration_env_vars,
        tags = tags,
        toolchains = toolchains,
        **kwargs
    )