@robby-rabbitman/nx-plus-web-test-runner
v0.10.0
Published
Web Test Runner integration for Nx workspaces.
Downloads
46
Maintainers
Readme
nx-plus-web-test-runner
Nx plugin to infer Web Test Runner in a workspace.
Note that @web/test-runner has not released a 1.0.0 yet.
🚀 Getting started
npm i -D @robby-rabbitman/nx-plus-web-test-runnernx g @robby-rabbitman/nx-plus-web-test-runner:initProjects with a Web Test Runner now have a test target.
nx run {{project}}:test📖 Documentation
@robby-rabbitman/nx-plus-web-test-runner:init
Adds @robby-rabbitman/nx-plus-web-test-runner/plugins/web-test-runner to the plugins in the nx.json.
Usage
nx g @robby-rabbitman/nx-plus-web-test-runner:initOptions
| Option | Type | Default | Description | | ---------------- | ------- | ------- | --------------------------------------------- | | test-target-name | string | 'test' | The name of the Web Test Runner target. | | skip-format | boolean | false | Whether to skip formatting the updated files. | | skip-add-plugin | boolean | false | Whether to skip adding the plugin. |
@robby-rabbitman/nx-plus-web-test-runner/plugins/web-test-runner
Adds a test target for projects that have a Web Test Runner config file in their root, the plugin infers a Web Test Runner with one of the following names.
web-test-runner.config.jsweb-test-runner.config.cjsweb-test-runner.config.mjswtr.config.jswtr.config.cjswtr.config.mjs
Options
// nx.json
"plugins": [
{
"plugin": "@robby-rabbitman/nx-plus-web-test-runner/plugins/web-test-runner",
"options": {
// the name of the web test runner target => nx run {{project}}:test
"testTargetName": "test",
// the default configuration of the web test runner targets inferred by this plugin
"testTargetConfig": {
"options":{
"watch": true,
"node-resolve": true
}
}
}
},
]