Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: missing import item in examples #997

Merged
merged 3 commits into from
Mar 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ For compatibility with Jest, `TestFunction` can also be of type `(done: DoneCall
Use `test.fails` to indicate that an assertion will fail explicitly.

```ts
import { test } from 'vitest'
import { expect, test } from 'vitest'
const myAsyncFunc = () => new Promise(resolve => resolve(1))
test.fails('fail test', () => {
expect(myAsyncFunc()).rejects.toBe(1)
Expand All @@ -122,7 +122,7 @@ For compatibility with Jest, `TestFunction` can also be of type `(done: DoneCall
When you use `test` in the top level of file, they are collected as part of the implicit suite for it. Using `describe` you can define a new suite in the current context, as a set of related tests and other nested suites. A suite lets you organize your tests so reports are more clear.

```ts
import { describe, test } from 'vitest'
import { describe, expect, test } from 'vitest'

const person = {
isActive: true,
Expand Down Expand Up @@ -178,7 +178,7 @@ When you use `test` in the top level of file, they are collected as part of the
Use `describe.skip` in a suite to avoid running a particular describe block.

```ts
import { describe, test } from 'vitest'
import { assert, describe, test } from 'vitest'

describe.skip('skipped suite', () => {
test('sqrt', () => {
Expand Down