Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions test/config/fixtures/exec-args-fixtures/vmThreads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { describe, expect, it } from 'vitest'

describe('exec-args', async () => {
it('should have the correct flags', () => {
expect(process.execArgv).toContain('--inspect-brk')
const execArgv = process.execArgv.map((arg) => arg.replace(/\\/g, '/'))
expect(execArgv).toContain('--inspect-brk')

// added via vitest
expect(process.execArgv).toContain('--experimental-import-meta-resolve')
expect(process.execArgv).toContain('--experimental-vm-modules')
expect(process.execArgv).toContain('--require')
expect(process.execArgv).toContainEqual(expect.stringContaining('/packages/vitest/suppress-warnings.cjs'))
expect(process.execArgv).toContain('--conditions')
expect(process.execArgv).toContain('node')
expect(execArgv).toContain('--experimental-import-meta-resolve')
expect(execArgv).toContain('--experimental-vm-modules')
expect(execArgv).toContain('--require')
expect(execArgv).toContainEqual(expect.stringContaining('/packages/vitest/suppress-warnings.cjs'))
expect(execArgv).toContain('--conditions')
expect(execArgv).toContain('node')
})
})
2 changes: 1 addition & 1 deletion test/dts-fixture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"private": true,
"scripts": {
"build": "rm -rf dist && tsc -p tsconfig.json",
"build": "rimraf dist && tsc -p tsconfig.json",
"check": "tsc -p tsconfig.check.json",
"test": "pnpm build && pnpm check"
},
Expand Down
10 changes: 10 additions & 0 deletions test/snapshots/generate.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { cpSync, mkdirSync, rmSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'

const snapshots = dirname(fileURLToPath(import.meta.url))
const dest = resolve(snapshots, 'test-update')

rmSync(dest, { recursive: true, force: true })
mkdirSync(dest)
cpSync(resolve(snapshots, './test/fixtures/test-update'), dest, { recursive: true })
2 changes: 1 addition & 1 deletion test/snapshots/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"test": "pnpm run test:generate && pnpm run test:update && pnpm test:update-new && pnpm test:update-none && pnpm run test:snaps",
"test:generate": "rm -rf ./test-update && cp -r ./test/fixtures/test-update ./test-update",
"test:generate": "node ./generate.mjs",
"test:snaps": "vitest run --dir test",
"test:update": "vitest run -u --dir test-update",
"test:update-none": "CI=true vitest run --dir test-update",
Expand Down
Loading