Skip to content

Commit d70b08b

Browse files
authored
test: fix test for node 22.10 (#6737)
1 parent 121b161 commit d70b08b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/reporters/src/data.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { AssertionError } from 'node:assert'
21
import type { ErrorWithDiff, File, Suite, Task } from 'vitest'
32

43
const file: File = {
@@ -26,12 +25,13 @@ const suite: Suite = {
2625
tasks: [],
2726
}
2827

29-
const error: ErrorWithDiff = new AssertionError({
28+
const error: ErrorWithDiff = {
29+
name: 'AssertionError',
3030
message: 'expected 2.23606797749979 to equal 2',
3131
actual: '2.23606797749979',
3232
expected: '2',
3333
operator: 'strictEqual',
34-
})
34+
}
3535
error.showDiff = true
3636
error.stack = 'AssertionError: expected 2.23606797749979 to equal 2\n'
3737
+ ' at /vitest/test/core/test/basic.test.ts:8:32\n'

0 commit comments

Comments
 (0)