From b0f0eb10f3ba157c3b603f77d9b5859de1c4cad6 Mon Sep 17 00:00:00 2001 From: John Gozde Date: Sat, 26 Nov 2022 11:43:49 -0700 Subject: [PATCH] Update TS output to account for bug https://github.com/microsoft/TypeScript/pull/51626 --- .../test/esbuild-plugin-typecheck.test.ts | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/packages/esbuild-plugin-typecheck/test/esbuild-plugin-typecheck.test.ts b/packages/esbuild-plugin-typecheck/test/esbuild-plugin-typecheck.test.ts index ac602f4..3dd1662 100644 --- a/packages/esbuild-plugin-typecheck/test/esbuild-plugin-typecheck.test.ts +++ b/packages/esbuild-plugin-typecheck/test/esbuild-plugin-typecheck.test.ts @@ -245,7 +245,15 @@ describe('eslint-plugin-typecheck', () => { it('produces no output by default', async () => { const { output } = await build.run('pkg-three/build.js', [], { watch: true }); - expect(output).toEqual(['✔ Typecheck passed', 'ℹ Typecheck finished in TIME']); + expect(output).toEqual([ + '✔ Typecheck passed', + 'ℹ Typecheck finished in TIME', + + // TODO: remove after https://github.com/microsoft/TypeScript/pull/51626 is released + '✔ Typecheck passed', + 'ℹ Typecheck finished in TIME', + // /TODO + ]); await expect(build.findTSOutput()).resolves.toEqual([]); }); @@ -269,6 +277,13 @@ describe('eslint-plugin-typecheck', () => { "../pkg-one/one.ts(7,33): error TS2504: Type 'AsyncIterator' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.", '✖ Typecheck failed with 1 error', 'ℹ Typecheck finished in TIME', + + // TODO: remove after https://github.com/microsoft/TypeScript/pull/51626 is released + "../pkg-one/one.ts(7,33): error TS2504: Type 'AsyncIterator' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.", + '✖ Typecheck failed with 1 error', + 'ℹ Typecheck finished in TIME', + // /TODO + // two-error "../pkg-two/two.ts(8,33): error TS2504: Type 'AsyncIterator' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.", "../pkg-one/one.ts(7,33): error TS2504: Type 'AsyncIterator' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.", @@ -281,6 +296,11 @@ describe('eslint-plugin-typecheck', () => { // two '✔ Typecheck passed', 'ℹ Typecheck finished in TIME', + + // TODO: remove after https://github.com/microsoft/TypeScript/pull/51626 is released + '✔ Typecheck passed', + 'ℹ Typecheck finished in TIME', + // /TODO ]); await expect(build.findTSOutput()).resolves.toEqual([ @@ -302,7 +322,15 @@ describe('eslint-plugin-typecheck', () => { watch: true, }); - expect(output).toEqual(['✔ Typecheck passed', 'ℹ Typecheck finished in TIME']); + expect(output).toEqual([ + '✔ Typecheck passed', + 'ℹ Typecheck finished in TIME', + + // TODO: remove after https://github.com/microsoft/TypeScript/pull/51626 is released + '✔ Typecheck passed', + 'ℹ Typecheck finished in TIME', + // /TODO + ]); await expect(build.findTSOutput()).resolves.toEqual([ 'pkg-one/build/one.js',