fix: fix test (#204)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
Horacio Herrera 2021-12-18 04:34:27 +01:00 committed by GitHub
parent 190a5a895a
commit bc9fff0256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -79,3 +79,4 @@ dist
# IDE
.idea
.vscode

View File

@ -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)