Skip to content

Commit

Permalink
Fix and enable migrate options tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Aug 19, 2023
1 parent 0532fa9 commit f7ea716
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
transformIgnorePatterns: ['/dist/.+\\.js'],
// We need to explicity ignore the out directory for modules - otherwise we'll get duplicate vscode module,
// the TS version from the __mocks__ directory and the compiled js version from the out directory.
modulePathIgnorePatterns: ['out'],
/* Specify jest to only run tests in jestUnitTests.
* We also have to include the __mocks__ folder. That folder must be next to node_modules so we can't move it,
* but if we specify roots, jest won't automatically pick it up. So we have to specify it here.
*/
// Specify jest to only run tests in jest folders.
// We also have to include the __mocks__ folder. That folder must be next to node_modules so we can't move it,
// but if we specify roots, jest won't automatically pick it up. So we have to specify it here.
roots: ['<rootDir>/test/unitTests', '<rootDir>/omnisharptest/omnisharpJestTests', '<rootDir>/__mocks__'],
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import * as jestLib from '@jest/globals';

jestLib.describe('Migrate configuration should in package.json', () => {
const packageJson = JSON.parse(readFileSync('package.json').toString());
const configurations = Object.keys(packageJson['contributes']['configuration']['properties']);
const properties = packageJson.contributes.configuration[1].properties;
const configurations = Object.keys(properties);

migrateOptions.forEach((data) => {
jestLib.test(`Should have ${data.roslynOption} in package.json`, () => {
Expand Down

0 comments on commit f7ea716

Please sign in to comment.