test: give each dev spec its own fixture copy · nuxt/cli@fcfd1bf · GitHub
Skip to content

Commit fcfd1bf

Browse files
committed
test: give each dev spec its own fixture copy
1 parent f6ec495 commit fcfd1bf

4 files changed

Lines changed: 29 additions & 3 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions

‎packages/nuxt-cli/test/e2e/dev-restart.spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { randomUUID } from 'node:crypto'
22
import { rm } from 'node:fs/promises'
33
import { join } from 'node:path'
4-
import { fileURLToPath } from 'node:url'
54
import { getPort } from 'get-port-please'
65
import { describe, expect, it, vi } from 'vitest'
76
import { initialize } from '../../src/dev'
7+
import { createDevFixture } from '../utils'
88

9-
const fixtureDir = fileURLToPath(new URL('../fixtures/dev', import.meta.url))
9+
const fixtureDir = await createDevFixture('dev-restart')
1010

1111
describe('dev server reload', () => {
1212
it('should settle in-flight requests when nuxt reloads', { timeout: 90_000 }, async () => {

‎packages/nuxt-cli/test/e2e/dev.spec.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { fileURLToPath } from 'node:url'
44
import { getPort } from 'get-port-please'
55
import { afterEach, describe, expect, it, vi } from 'vitest'
66
import { runCommand } from '../../src'
7+
import { createDevFixture } from '../utils'
78

89
const NEWLINE_RE = /\r?\n/
910

10-
const fixtureDir = fileURLToPath(new URL('../fixtures/dev', import.meta.url))
11+
const fixtureDir = await createDevFixture('dev')
1112

1213
const certsDir = fileURLToPath(new URL('../../../../playground/certs', import.meta.url))
1314
const httpsCert = join(certsDir, 'cert.dummy')

‎packages/nuxt-cli/test/utils/index.ts‎

Lines changed: 24 additions & 0 deletions

0 commit comments

Comments
 (0)