Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: migrate jest-runner-vscode to @vscode/test-cli #580

Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9deb173
Install `@vscode/test-cli` and `@vscode/test-electron`
ybiquitous Aug 26, 2024
8a57e57
Configure vscode-test-cli
ybiquitous Aug 26, 2024
3e178ce
Migrate `test/e2e/__tests__/validate.ts`
ybiquitous Aug 26, 2024
6775b83
Fix caching VS Code binaries in CI
ybiquitous Aug 26, 2024
760c40c
Add 'Autofix' to cspell words
ybiquitous Aug 26, 2024
e1b230e
Enable `skipLibCheck` to prevent type errors in `node_modules/`
ybiquitous Aug 26, 2024
bfbf8c8
Migrate `test/e2e/__tests__/stylelint-resolution.ts`
ybiquitous Aug 26, 2024
6f2372d
Refactor to rename `common.ts` to `helpers.ts`
ybiquitous Aug 26, 2024
73a27e0
Migrate `test/e2e/__tests__/restart.ts`
ybiquitous Aug 26, 2024
e48dd59
Migrate `test/e2e/__tests__/report-needless-disables.ts`
ybiquitous Aug 26, 2024
f822d95
Migrate `test/e2e/__tests__/report-invalid-scope-disables.ts`
ybiquitous Aug 26, 2024
50ef3f6
Migrate `test/e2e/__tests__/report-descriptionless-disables.ts`
ybiquitous Aug 26, 2024
282e71d
Migrate `test/e2e/__tests__/lint.ts`
ybiquitous Aug 26, 2024
fd61523
Migrate `test/e2e/__tests__/ignore.ts`
ybiquitous Aug 26, 2024
0f3ada8
Fix flakiness for `test/e2e/__tests__/restart.ts`
ybiquitous Aug 26, 2024
7b8873d
Migrate `test/e2e/__tests__/{format,ignore-disables}.ts`
ybiquitous Aug 26, 2024
74436c0
Migrate `test/e2e/__tests__/custom-syntax.ts`
ybiquitous Aug 26, 2024
a06280a
Migrate `test/e2e/__tests__/config-file.ts`
ybiquitous Aug 26, 2024
56e33bc
Increase timeout in `test/e2e/__tests__/restart.ts`
ybiquitous Aug 26, 2024
1e0e603
Migrate `test/e2e/__tests__/config-basedir.ts`
ybiquitous Aug 26, 2024
96e4ad5
Migrate `test/e2e/__tests__/code-actions.ts`
ybiquitous Aug 26, 2024
8075270
Remove no longer needed `scripts/download-vscode.ts`
ybiquitous Aug 26, 2024
41b42ac
Remove no longer needed files for E2E with Jest
ybiquitous Aug 26, 2024
a9e6df1
Remove no longer needed `p-wait-for` dependency
ybiquitous Aug 26, 2024
05632eb
Remove no longer needed `jest-runner-vscode` dependency
ybiquitous Aug 26, 2024
09b0486
Remove `test/e2e/jest.config.js` reference
ybiquitous Aug 26, 2024
4ca5f8c
Suppress `jest/expect-expect` ESLint problems for E2E tests
ybiquitous Aug 26, 2024
d34fc21
Remove comment-out type
ybiquitous Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Configure vscode-test-cli
  • Loading branch information
ybiquitous committed Aug 26, 2024
commit 8a57e57bed1b7845a2ba900c93888b3a3dbebb3d
20 changes: 20 additions & 0 deletions .vscode-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';

const { defineConfig } = require('@vscode/test-cli');

const pkg = require('./package.json');

const minimumVscodeVersion = pkg.engines.vscode.match(/^>=(.+)$/)?.[1];

if (!minimumVscodeVersion) throw new Error(`"engines.vscode" is unexpected: ${pkg.engines.vscode}`);

module.exports = defineConfig({
files: 'test/e2e/__tests__/**/*.ts',
workspaceFolder: 'test/e2e/workspace/workspace.code-workspace',
version: minimumVscodeVersion,
mocha: {
timeout: 60000,
ui: 'bdd',
require: ['ts-node/register'],
},
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -267,7 +267,7 @@
"lint:types": "tsc -b",
"lint:unit-tests": "ts-node --transpile-only -P tsconfig.scripts.json scripts/enforce-unit-tests-per-file.ts",
"test": "npm run build-bundle && jest",
"test:e2e": "npm run build-bundle && jest --projects test/e2e",
"test:e2e": "npm run build-bundle && vscode-test",
"test:integration": "jest --projects test/integration",
"test:unit": "jest --projects test/unit",
"vscode:prepublish": "npm run build && npm run bundle-base -- --minify"