Skip to content

Commit

Permalink
test: fix test for node 22.10 (#6737)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa authored Oct 18, 2024
1 parent 121b161 commit d70b08b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/reporters/src/data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { AssertionError } from 'node:assert'
import type { ErrorWithDiff, File, Suite, Task } from 'vitest'

const file: File = {
Expand Down Expand Up @@ -26,12 +25,13 @@ const suite: Suite = {
tasks: [],
}

const error: ErrorWithDiff = new AssertionError({
const error: ErrorWithDiff = {
name: 'AssertionError',
message: 'expected 2.23606797749979 to equal 2',
actual: '2.23606797749979',
expected: '2',
operator: 'strictEqual',
})
}
error.showDiff = true
error.stack = 'AssertionError: expected 2.23606797749979 to equal 2\n'
+ ' at /vitest/test/core/test/basic.test.ts:8:32\n'
Expand Down

0 comments on commit d70b08b

Please sign in to comment.