firsttris / vscode-jest-runner

Simple way to run or debug one or more tests from context menu, codelens or command plalette
https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner
MIT License
264 stars 124 forks source link

Support custom file extensions as set up in jest.config.ts #256

Open aristofun opened 2 years ago

aristofun commented 2 years ago

I see no context menu run/debug options with Jest Runner 0.4.48 on *.e2e.ts files even though my jest.config.js is:

module.exports = {
  preset: 'ts-jest',
  testEnvironment: 'node',
  globalSetup: '<rootDir>/__tests__/setup.ts',
  globalTeardown: '<rootDir>/__tests__/teardown.ts',
  testRegex: '/*/.*\\.(spec|e2e|it)\\.(ts)$',
  testPathIgnorePatterns: ['/node_modules/', '/dist/'],
};

How to make the extension see all the files actual Jest sees in the repo?

firsttris commented 2 years ago

for the explorer/context menu its hardcoded here:

https://github.com/firsttris/vscode-jest-runner/blob/master/package.json#L180

we would need to add e2e

for codeLens there is a extenion setting: jestrunner.codeLensSelector https://github.com/firsttris/vscode-jest-runner#extension-settings