Skip to content

Commit 1979db5

Browse files
committed
feat(docs): add testing guidelines for contributions
1 parent 9a1ef53 commit 1979db5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ extensions to have these tools applied automatically as you develop:
3535
- [Prettier - Code Formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
3636
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
3737

38+
## Testing
39+
40+
We expect contributions to include tests that demonstrate and validate the intended behavior.
41+
42+
- New features: add a set of VS Code integration tests that demo the intended behaviour by making use of the mock workspace under `test/bazel_workspace` (vscode-tests will be executed within this workspace). Integration tests should exercise the extension as a user would (for example: open editors, execute commands with `vscode.commands.executeCommand`, and assert on the editor state or extension outputs). See `test/go_to_label.test.ts` for a minimal integration-style example.
43+
44+
- Utilities and bug fixes: extend the existing unit tests. If you add a new util or fix an existing one, include unit tests that cover the happy path and at least one edge case. See `test/code_lens_provider.test.ts` for a unit-style example.
45+
3846
## Commit messages
3947

4048
Commit messages should follow the [Conventional Commit message](https://www.conventionalcommits.org/)

0 commit comments

Comments
 (0)