From 57fef9e61a3d1c2b458ffd16cd4ab447131ab4a2 Mon Sep 17 00:00:00 2001 From: Armano Date: Mon, 15 Feb 2021 14:10:39 +0100 Subject: [PATCH] fix: correct test names on windows for semantic-diagnostics-enabled --- .../tests/lib/semantic-diagnostics-enabled.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts index 31f212261e20..3cbe87f9f552 100644 --- a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts +++ b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts @@ -10,11 +10,13 @@ import { formatSnapshotName, isJSXFileType } from '../../tools/test-utils'; */ const FIXTURES_DIR = path.join(__dirname, '../../../shared-fixtures/fixtures'); -const testFiles = glob.sync(`${FIXTURES_DIR}/**/*.src.*`); +const testFiles = glob.sync(`**/*.src.*`, { + cwd: FIXTURES_DIR, +}); describe('Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled', () => { testFiles.forEach(filename => { - const code = readFileSync(filename, 'utf8'); + const code = readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); const fileExtension = path.extname(filename); const config: parser.TSESTreeOptions = { loc: true,