def METHOD_NAME(request, rule_runner: RuleRunner) -> RuleRunner:
    lockfile, package_manager = request.param
    rule_runner.set_options([f"--nodejs-package-manager={package_manager}"], env_inherit={"PATH"})
    rule_runner.write_files(
        {
            "src/js/BUILD": dedent(
                """\
                package_json(
                    scripts=[
                        node_build_script(
                            entry_point="build",
                            output_directories=["dist"],
                            extra_caches=[".parcel-cache"],
                        )
                    ],
                    dependencies=[":npmrc"],
                )
                file(name="npmrc", source=".npmrc")
                """
            ),
            "src/js/package.json": json.dumps(
                {
                    "name": "ham",
                    "version": "0.0.1",
                    "source": "lib/index.mjs",
                    "scripts": {
                        "build": "parcel build lib/index.mjs --dist-dir=dist --cache-dir=.parcel-cache"
                    },
                    "devDependencies": {"parcel": "2.6.2"},
                }
            ),
            "src/js/.npmrc": "strict-peer-dependencies=false",
            f"src/js/{lockfile.name}": lockfile.read_text(),
            "src/js/lib/BUILD": dedent(
                """\
                javascript_sources(dependencies=[":style"])
                resource(name="style", source="style.css")
                """
            ),
            "src/js/lib/style.css": "",
            "src/js/lib/index.mjs": "import './style.css' ",
        }
    )
    return rule_runner