From 885780d4a2b07e418256b7323d76b18453c14a50 Mon Sep 17 00:00:00 2001 From: Armano Date: Thu, 18 Feb 2021 20:04:01 +0100 Subject: [PATCH] fix: correct test names on windows for semantic-diagnostics-enabled (#3060) Co-authored-by: Brad Zacher --- .../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 31f212261e2..3cbe87f9f55 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,