diff --git a/__tests__/integration/errors.spec.ts b/__tests__/integration/errors.spec.ts index 5838ed8f..d44e09e8 100644 --- a/__tests__/integration/errors.spec.ts +++ b/__tests__/integration/errors.spec.ts @@ -34,7 +34,7 @@ test("integration - tsconfig errors", async () => { // TODO: move to parse-tsconfig unit tests? expect(genBundle("semantic.ts", { tsconfig: "non-existent-tsconfig", - })).rejects.toThrow("rpt2: failed to open 'undefined'"); // FIXME: bug: this should be "non-existent-tsconfig", not "undefined" + })).rejects.toThrow("rpt2: failed to open 'non-existent-tsconfig'"); }); test("integration - semantic error", async () => { diff --git a/src/parse-tsconfig.ts b/src/parse-tsconfig.ts index 7686dfc9..b24a0bb9 100644 --- a/src/parse-tsconfig.ts +++ b/src/parse-tsconfig.ts @@ -15,7 +15,7 @@ export function parseTsConfig(context: IContext, pluginOptions: IOptions) // if the value was provided, but no file, fail hard if (pluginOptions.tsconfig !== undefined && !fileName) - throw new Error(`rpt2: failed to open '${fileName}'`); + throw new Error(`rpt2: failed to open '${pluginOptions.tsconfig}'`); let loadedConfig: any = {}; let baseDir = pluginOptions.cwd;