
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
jest-runner-vscode
Advanced tools
Runs extension tests in VS Code using Jest. Used by the official Stylelint VS Code extension!
Note: This runner is in its early stages of development and is subject to change. Contributions and suggestions are welcome!
Note: Versions 1.x and earlier of this package on npm are an entirely different package, a library for running jest within a VS Code process, that was moved to vscode-jest-test-runner. The library under the old name was kept on npm so that existing projects don't break their test runs, but it is no longer maintained.
If you are using the old version of the npm package, either migrate to this Jest runner or switch your dependencies to the vscode-jest-test-runner package.
Requires Node.js 16.14 or later. Project is tested on VS Code 1.71.1.
$ yarn add -D jest-runner-vscode
or
$ npm i -D jest-runner-vscode
See the public types for details on all available configuration options.
// jest.config.js (or similar)
module.exports = {
runner: 'vscode',
}
// jest-runner-vscode.config.js
/** @type {import('jest-runner-vscode').RunnerOptions} */
module.exports = {
version: '1.71.1',
extensionTestsEnv: {
FOO_BAR: 'baz',
},
launchArgs: ['--new-window', '--disable-extensions'],
workspaceDir: 'path/to/workspace',
openInFolder: true,
}
Configuration files in nested folders inherit the parent folder's configuration.
Tests are run sequentially.
A single instance of VS Code is launched for each unique directory containing tests. This allows you to save time for test suites that do not require relaunching the editor. Example:
/path/to/project/lib/__tests__/foo.test.js
/path/to/project/lib/__tests__/bar.test.js
--> run in the same instance
/path/to/project/src/__tests__/foo.test.js
/path/to/project/3rd-party/__tests__/bar.test.js
--> run in separate instances
FAQs
Jest runner for testing VS Code extensions
We found that jest-runner-vscode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.