This is the contribution guide for mutation-testing-elements. Great to have you here! Here are a few ways you can help make this project better.
Get in touch with us through twitter or via the Stryker Slack.
Please adhere to our editorconfig, eslint rules and prettier rules.
If you're using vscode, please open the workspace.code-workspace file (note: not the directory) and install the recommended extensions.
Install the following:
- An LTS version of NodeJS
- For metrics-scala:
We use nx to manage the packages in this repository. You don't have to install it globally. The packages themselves can be found in the packages folder.
Here are some common nx commands:
npx nx show projects
(optionall with--affected
)npx nx run-many --target test
npx nx test metrics
npx nx run metrics:test
npm run all -- --base=master
In general, whenever you want to npm run $A
something, instead call npx nx $A $PROJECT
where $PROJECT
is the name of the project you want to run it on. For example, npm run test:unit
in packages/elements
becomes npx nx test:unit elements
.
Some quick notes to help you get started:
- On the left side, you can see all stryker projects and plugins. Open files from there.
- Use
CTRL+Shift+B
(or⌘+Shift+B
on OSX) to run the build task. This runsnpm start
, compiling any changes you make in the background. - Use
CTRL+Shift+D
(or⌘⇧D
on OSX) to open up the debug pane. Here you can select a config to run.
Have fun!
To debug the unit tests, you can place a debugger
statement on the place you want to debug. Then, start the unit tests and open the dev tools to trigger the debug statement.
Install the VS Code Playwright plugin (from the recommended extensions). Then run any test from the sidebar in a test file.
We support mutation testing mutation-testing-elements with Stryker! You can run it with npx nx run PACKAGE_NAME:stryker
, for example npx nx run elements:stryker
.
New features are welcome! Either as requests or proposals.
- Please create an issue first or let us know via the Stryker Slack
- Create a fork on your github account.
- When writing your code, please conform to the existing coding style.
See .editorconfig, the typescript guidelines and our tslint.json
- You can check if there are lint issues using
npx nx run-many -t lint
. - You can automatically fix a lot of lint issues using
npm run lint:fix
- You can check if there are lint issues using
- Please create or edit unit tests or integration tests.
- Run the tests using
npx nx run test
- Push your changes and create a pull request
Don't get discouraged! We estimate that the response time from the maintainers is around 3 days or so.
Found a bug? Don't worry, we'll fix it, or you can ;)
Please report a bug report on our issues page. In this please:
- Label the issue as bug
- Explain what the bug is in clear English
- Include reproduction steps This can be an example project, code snippet, etc
- Include the expected behavior.
- Include actual behavior.
- Add more details if required (e.g. which browser, which test runner, which versions, etc)