mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
chore: use @nuxt/test-utils
to import test utils (#3261)
This commit is contained in:
parent
289d54eb24
commit
16c2b6113a
@ -1,14 +1,12 @@
|
||||
import { fileURLToPath } from 'url'
|
||||
import { resolve } from 'path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
// TODO: Should import from @nuxt/test-utils
|
||||
import { setup, $fetch } from '../../packages/test-utils/src'
|
||||
import { setup, $fetch } from '@nuxt/test-utils'
|
||||
|
||||
const examplesDir = fileURLToPath(new URL('../../examples', import.meta.url))
|
||||
|
||||
await setup({
|
||||
rootDir: resolve(examplesDir, 'hello-world'),
|
||||
runner: 'vitest',
|
||||
server: true
|
||||
})
|
||||
|
||||
|
8
vitest.config.ts
Normal file
8
vitest.config.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { resolve } from 'path'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
export default defineConfig({
|
||||
alias: {
|
||||
'@nuxt/test-utils': resolve('./packages/test-utils/src/index.ts')
|
||||
}
|
||||
})
|
Loading…
Reference in New Issue
Block a user