mirror of
https://github.com/vitest-dev/vitest.git
synced 2026-02-01 17:36:51 +00:00
fix: fix test (#204)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
parent
190a5a895a
commit
bc9fff0256
1
.gitignore
vendored
1
.gitignore
vendored
@ -79,3 +79,4 @@ dist
|
||||
|
||||
# IDE
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { describe, it, expect, assert, vitest } from 'vitest'
|
||||
import { assert, describe, expect, it, vitest } from 'vitest'
|
||||
|
||||
describe('mock', () => {
|
||||
it('basic', () => {
|
||||
@ -19,7 +19,7 @@ describe('mock', () => {
|
||||
fn('World', 2)
|
||||
fn('Hi', 1)
|
||||
|
||||
expect(fn.mock.calls.at(-1)).toEqual(['Hi', 1])
|
||||
expect(fn.mock.calls[1]).toEqual(['Hi', 1])
|
||||
|
||||
expect(fn).toHaveBeenNthCalledWith(1, 'World', 2)
|
||||
expect(fn).toHaveBeenNthCalledWith(2, 'Hi', 1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user