Skip to content

Commit 91b06dc

Browse files
committed
Fake the fs module so we can spy on it
1 parent 206b842 commit 91b06dc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/lsptoolshost/unitTests/migrateOptions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { getVSCodeWithConfig } from '../../fakes';
1818
import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId';
1919
import { ConfigurationTarget } from '../../../src/vscodeAdapter';
2020

21+
jest.mock('fs', () => ({ __esModule: true, ...(<any>jest.requireActual('fs')) }));
22+
2123
describe('Migrate configurations', () => {
2224
const packageJson = JSON.parse(fs.readFileSync('package.json').toString());
2325
const configuration = packageJson.contributes.configuration;

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"ES2021"
99
],
1010
"sourceMap": true,
11-
"moduleDetection": "force",
1211
"moduleResolution": "node",
12+
"moduleDetection": "force",
1313
"strict": true,
1414
"forceConsistentCasingInFileNames": true,
1515
"skipLibCheck": true,

0 commit comments

Comments
 (0)