You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,14 +95,17 @@ More information about Storybook can be found inside the **Overview** page once
95
95
96
96
We have several types of tests:
97
97
98
-
* Unit tests: these live in the `tests/pure-tests/` directory
98
+
* Unit tests: these live in the `tests/unit-tests/` directory
99
99
* View tests: these live in `src/view/variant-analysis/__tests__/`
100
-
* VSCode integration tests: these live in `src/vscode-tests/no-workspace` and `src/vscode-tests/minimal-workspace`
101
-
* CLI integration tests: these live in `src/vscode-tests/cli-integration`
100
+
* VSCode integration tests:
101
+
*`test/vscode-tests/no-workspace` tests: These are intended to cover functionality that is meant to work before you even have a workspace open.
102
+
*`test/vscode-tests/minimal-workspace` tests: These are intended to cover functionality that need a workspace but don't require the full extension to be activated.
103
+
* CLI integration tests: these live in `test/vscode-tests/cli-integration`
104
+
* These tests are intendended to be cover functionality that is related to the integration between the CodeQL CLI and the extension.
102
105
103
106
The CLI integration tests require an instance of the CodeQL CLI to run so they will require some extra setup steps. When adding new tests to our test suite, please be mindful of whether they need to be in the cli-integration folder. If the tests don't depend on the CLI, they are better suited to being a VSCode integration test.
104
107
105
-
Any test data you're using (sample projects, config files, etc.) must go in a `src/vscode-tests/*/data` directory. When you run the tests, the test runner will copy the data directory to `out/vscode-tests/*/data`.
108
+
Any test data you're using (sample projects, config files, etc.) must go in a `test/vscode-tests/*/data` directory. When you run the tests, the test runner will copy the data directory to `out/vscode-tests/*/data`.
106
109
107
110
#### Running the tests
108
111
@@ -155,16 +158,16 @@ The CLI integration tests require the CodeQL standard libraries in order to run
155
158
##### 1. From the terminal
156
159
157
160
The easiest way to run a single test is to change the `it` of the test to `it.only` and then run the test command with some additional options
158
-
to only run tests for this specific file. For example, to run the test `src/vscode-tests/cli-integration/run-queries.test.ts`:
161
+
to only run tests for this specific file. For example, to run the test `test/vscode-tests/cli-integration/run-queries.test.ts`:
159
162
160
163
```shell
161
-
npm run cli-integration -- --runTestsByPath src/vscode-tests/cli-integration/run-queries.test.ts
164
+
npm run cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts
162
165
```
163
166
164
-
You can also use the `--testNamePattern` option to run a specific test within a file. For example, to run the test `src/vscode-tests/cli-integration/run-queries.test.ts`:
167
+
You can also use the `--testNamePattern` option to run a specific test within a file. For example, to run the test `test/vscode-tests/cli-integration/run-queries.test.ts`:
165
168
166
169
```shell
167
-
npm run cli-integration -- --runTestsByPath src/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
170
+
npm run cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
168
171
```
169
172
170
173
##### 2. From VSCode
@@ -221,6 +224,7 @@ Pre-recorded scenarios are stored in `./src/mocks/scenarios`. However, it's poss
221
224
222
225
## Releasing (write access required)
223
226
227
+
1. Go through [our test plan](/extensions/ql-vscode/docs/test-plan.md) to ensure that the extension is working as expected.
224
228
1. Double-check the `CHANGELOG.md` contains all desired change comments and has the version to be released with date at the top.
225
229
* Go through all recent PRs and make sure they are properly accounted for.
226
230
* Make sure all changelog entries have links back to their PR(s) if appropriate.
0 commit comments