Skip to content

Commit

Permalink
Fix CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 committed Mar 12, 2023
1 parent 824b8f4 commit 050dd3b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions source/test/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,36 +39,30 @@ test('diff cli', async t => {
const file = path.join(__dirname, 'fixtures/diff');

const {exitCode, stderr} = await t.throwsAsync<ExecaError>(execa('dist/cli.js', [file, '--show-diff']));
const expectedLines = stderr.trim().split('\n').slice(1).map(line => line.trim());
const expectedLines = stderr.trim().split('\n').map(line => line.trim()).filter(Boolean);

t.is(exitCode, 1);

t.deepEqual(expectedLines, [
'dist\\test\\fixtures\\diff\\index.test-d.ts:8:0',
'✖ 8:0 Parameter type { life?: number | undefined; } is declared too wide for argument type { life: number; }.',
'',
'- { life?: number | undefined; }',
'+ { life: number; }',
'✖ 9:0 Parameter type FooFunction is not identical to argument type () => number.',
'',
'- (x?: string | undefined) => number',
'+ () => number',
'✖ 10:0 Parameter type FooType is declared too wide for argument type Required<FooType>.',
'',
'- { foo?: "foo" | undefined; }',
'+ { foo: "foo"; }',
'✖ 11:0 Parameter type Partial<FooInterface> is declared too wide for argument type Required<FooInterface>.',
'',
'- { [x: string]: unknown; readonly protected?: boolean | undefined; fooType?: FooType | undefined; id?: "foo-interface" | undefined; }',
'+ { [x: string]: unknown; readonly protected: boolean; fooType: FooType; id: "foo-interface"; }',
'✖ 13:0 Argument of type { life: number; } is assignable to parameter of type { life?: number | undefined; }.',
'',
'- { life?: number | undefined; }',
'+ { life: number; }',
'✖ 18:0 Documentation comment This is a comment. for expression commented does not include expected This is not the same comment!.',
'',
'- This is not the same comment!',
'+ This is a comment.',
'',
'6 errors'
]);
});

0 comments on commit 050dd3b

Please sign in to comment.