Skip to content

Commit

Permalink
Update TS output to account for bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoz committed Nov 26, 2022
1 parent 7f00c90 commit b0f0eb1
Showing 1 changed file with 30 additions and 2 deletions.
Expand Up @@ -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([]);
});
Expand All @@ -269,6 +277,13 @@ describe('eslint-plugin-typecheck', () => {
"../pkg-one/one.ts(7,33): error TS2504: Type 'AsyncIterator<string, any, undefined>' 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<string, any, undefined>' 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<string, any, undefined>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.",
"../pkg-one/one.ts(7,33): error TS2504: Type 'AsyncIterator<string, any, undefined>' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.",
Expand All @@ -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([
Expand All @@ -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',
Expand Down

0 comments on commit b0f0eb1

Please sign in to comment.