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

fix: remove describe async support #746

Merged
merged 2 commits into from Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/lit/test/basic.test.ts
Expand Up @@ -7,7 +7,7 @@ declare global {
interface Window extends IWindow {}
}

describe('Button with increment', async() => {
describe('Button with increment', () => {
beforeEach(async() => {
document.body.innerHTML = '<my-button name="World"></my-button>'
await window.happyDOM.whenAsyncComplete()
Expand Down
2 changes: 1 addition & 1 deletion examples/puppeteer/test/basic.test.ts
Expand Up @@ -4,7 +4,7 @@ import type { PreviewServer } from 'vite'
import puppeteer from 'puppeteer'
import type { Browser, Page } from 'puppeteer'

describe('basic', async() => {
describe('basic', () => {
let server: PreviewServer
let browser: Browser
let page: Page
Expand Down
2 changes: 1 addition & 1 deletion examples/react-testing-lib/src/components/input.test.tsx
Expand Up @@ -2,7 +2,7 @@ import '@testing-library/jest-dom'
import { render, screen, userEvent } from '../utils/test-utils'
import { Input } from './Input'

describe('Input', async() => {
describe('Input', () => {
it('should render the input', () => {
render(
<Input
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/types/tasks.ts
Expand Up @@ -78,7 +78,7 @@ export interface SuiteCollector {
on: <T extends keyof SuiteHooks>(name: T, ...fn: SuiteHooks[T]) => void
}

export type SuiteFactory = (test: (name: string, fn: TestFunction) => void) => Awaitable<void>
export type SuiteFactory = (test: (name: string, fn: TestFunction) => void) => void

export interface RuntimeContext {
tasks: (SuiteCollector | Test)[]
Expand Down
4 changes: 2 additions & 2 deletions test/fails/test/runner.test.ts
Expand Up @@ -3,9 +3,9 @@ import fg from 'fast-glob'
import { execa } from 'execa'
import { describe, expect, it } from 'vitest'

describe('should fails', async() => {
describe('should fails', () => {
const root = resolve(__dirname, '../fixtures')
const files = await fg('*.test.ts', { cwd: root })
const files = fg.sync('*.test.ts', { cwd: root })

for (const file of files) {
it(file, async() => {
Expand Down