diff --git a/__tests__/integration/errors.spec.ts b/__tests__/integration/errors.spec.ts index 0c6b6387..f4be8b60 100644 --- a/__tests__/integration/errors.spec.ts +++ b/__tests__/integration/errors.spec.ts @@ -10,7 +10,7 @@ import * as helpers from "./helpers"; // increase timeout to 15s for whole file since CI occassionally timed out -- these are integration and cache tests, so longer timeout is warranted jest.setTimeout(15000); -const local = (x: string) => path.resolve(__dirname, x); +const local = (x: string) => normalize(path.resolve(__dirname, x)); const cacheRoot = local("__temp/errors/rpt2-cache"); // don't use the one in node_modules afterAll(async () => { @@ -20,7 +20,7 @@ afterAll(async () => { }); async function genBundle(relInput: string, extraOpts?: RPT2Options, onwarn?: Mock) { - const input = normalize(local(`fixtures/errors/${relInput}`)); + const input = local(`fixtures/errors/${relInput}`); return helpers.genBundle({ input, tsconfig: local("fixtures/errors/tsconfig.json"), diff --git a/src/index.ts b/src/index.ts index 03bc7130..6ec64ddf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -56,6 +56,7 @@ const typescript: PluginImpl = (options) => const typecheckFile = (id: string, snapshot: tsTypes.IScriptSnapshot, tcContext: IContext) => { + id = normalize(id); checkedFiles.add(id); // must come before print, as that could bail const diagnostics = getDiagnostics(id, snapshot);