Skip to content

Commit

Permalink
fix: move config related methods to 'vitest/node' (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Feb 16, 2022
1 parent 18cc578 commit ce418c5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/config/index.md
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
You can retrieve Vitest's default options to expand them if needed:

```ts
import { defineConfig, configDefaults } from 'vitest'
import { defineConfig, configDefaults } from 'vitest/node'

export default defineConfig({
test: {
Expand Down
7 changes: 0 additions & 7 deletions packages/vitest/src/index.ts
@@ -1,4 +1,3 @@
import type { UserConfig } from 'vite'
import type { Plugin as PrettyFormatPlugin } from 'pretty-format'
import type { Any, Anything } from './integrations/chai/jest-asymmetric-matchers'
import type { MatcherState, MatchersObject } from './integrations/chai/types'
Expand All @@ -14,8 +13,6 @@ export * from './integrations/vi'
export * from './types'
export * from './api/types'

export { configDefaults } from './defaults'

type VitestInlineConfig = InlineConfig

declare module 'vite' {
Expand All @@ -27,10 +24,6 @@ declare module 'vite' {
}
}

export function defineConfig(config: UserConfig) {
return config
}

interface AsymmetricMatchersContaining {
stringContaining(expected: string): any
objectContaining(expected: any): any
Expand Down
7 changes: 7 additions & 0 deletions packages/vitest/src/node/index.ts
@@ -1,3 +1,10 @@
import type { UserConfig } from 'vite'

export { configDefaults } from '../defaults'
export function defineConfig(config: UserConfig) {
return config
}

export type { Vitest } from './core'
export { createVitest } from './create'
export { VitestPlugin } from './plugins'

0 comments on commit ce418c5

Please sign in to comment.