Skip to content

Commit

Permalink
test: update config
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Sep 14, 2024
1 parent 203242a commit 87b5850
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion packages/config/vite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function createViteConfig(config) {
},
},
test: {
globals: true,
environment: 'jsdom',
...config?.test,
coverage: {
Expand Down
5 changes: 2 additions & 3 deletions packages/test-utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import userEvent from '@testing-library/user-event'
import type { Options as UserEventOptions } from '@testing-library/user-event/options'
import { type Options as UserEventOptions, userEvent } from '@testing-library/user-event'
import { vi } from 'vitest'

export function noop() {
Expand All @@ -8,7 +7,7 @@ export function noop() {

export function setupUserEvent(options?: UserEventOptions) {
return userEvent.setup({
advanceTimers: (delay) => vi.advanceTimersByTime(delay),
advanceTimers: vi.advanceTimersByTime,
delay: null,
...options,
})
Expand Down
1 change: 1 addition & 0 deletions vitest.workspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["packages/*", "examples/react/*"]

0 comments on commit 87b5850

Please sign in to comment.