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
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,10 +98,11 @@ We have several types of tests:
98
98
* Unit tests: these live in the `tests/unit-tests/` directory
99
99
* View tests: these live in `src/view/variant-analysis/__tests__/`
100
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.
101
+
*`test/vscode-tests/activated-extension` tests: These are intended to cover functionality that require the full extension to be activated but don't require the CLI. This suite is not run against multiple versions of the CLI in CI.
102
+
*`test/vscode-tests/no-workspace` tests: These are intended to cover functionality that is meant to work before you even have a workspace open but don't require the extension to be activated.
102
103
*`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
104
* 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.
105
+
* These tests are intended to be cover functionality that is related to the integration between the CodeQL CLI and the extension. These tests are run against all supported versions of the CLI in CI.
105
106
106
107
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.
107
108
@@ -119,7 +120,7 @@ Then, from the `extensions/ql-vscode` directory, use the appropriate command to
119
120
120
121
* Unit tests: `npm run test:unit`
121
122
* View Tests: `npm test:view`
122
-
* VSCode integration tests: `npm run integration`
123
+
* VSCode integration tests: `npm run test:vscode-integration`
123
124
124
125
###### CLI integration tests
125
126
@@ -130,7 +131,7 @@ The CLI integration tests require the CodeQL standard libraries in order to run
130
131
2. Run your test command:
131
132
132
133
```shell
133
-
cd extensions/ql-vscode && npm run cli-integration
134
+
cd extensions/ql-vscode && npm run test:cli-integration
134
135
```
135
136
136
137
##### 2. From VSCode
@@ -161,13 +162,13 @@ The easiest way to run a single test is to change the `it` of the test to `it.on
161
162
to only run tests for this specific file. For example, to run the test `test/vscode-tests/cli-integration/run-queries.test.ts`:
162
163
163
164
```shell
164
-
npm run cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts
165
+
npm run test:cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts
165
166
```
166
167
167
168
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`:
168
169
169
170
```shell
170
-
npm run cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
171
+
npm run test:cli-integration -- --runTestsByPath test/vscode-tests/cli-integration/run-queries.test.ts --testNamePattern "should create a QueryEvaluationInfo"
0 commit comments