Skip to content

Commit 945cd71

Browse files
committed
test: update
1 parent 1823a6f commit 945cd71

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

test/lint/formatter.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @stylistic/semi-style */
12
import { describe, expect, it, jest } from '@jest/globals'
23
import { ESLint } from 'eslint'
34

test/lint/linter.test.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @stylistic/semi-style */
12
/* eslint-disable @typescript-eslint/naming-convention */
23
import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'
34

@@ -56,16 +57,25 @@ describe('Linter', () => {
5657
}))
5758

5859
;(ESLint as jest.Mock<any>).mockReturnValue({
59-
run: () => ([{ filePath: 'file1', messages: [message1] }])
60+
run: () => ({
61+
results: [{ filePath: 'file1', messages: [message1] }],
62+
rules: []
63+
})
6064
})
6165
;(TypeCoverage as jest.Mock<any>).mockReturnValue({
62-
run: () => ([{ filePath: 'file1', messages: [message2] }])
66+
run: () => ({
67+
results: [{ filePath: 'file1', messages: [message2] }],
68+
rules: []
69+
})
6370
})
6471
;(TypeCheck as jest.Mock<any>).mockReturnValue({
65-
run: () => ([{ filePath: 'file2', messages: [message1] }])
72+
run: () => ({
73+
results: [{ filePath: 'file2', messages: [message1] }],
74+
rules: []
75+
})
6676
})
6777

68-
await lint()
78+
await lint({ output: ['stdout'] })
6979

7080
expect(format).toHaveBeenCalledTimes(1)
7181
expect(format).toHaveBeenCalledWith([

0 commit comments

Comments
 (0)