Skip to content

Commit 7ff8ef1

Browse files
committed
chore: use tinyexec in test suite
1 parent 417777f commit 7ff8ef1

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"jiti": "^1.21.6",
5858
"nuxi": "^3.13.2",
5959
"nuxt": "^3.13.2",
60+
"tinyexec": "^0.3.0",
6061
"typescript": "^5.6.2",
6162
"vitest": "^2.1.1",
6263
"vue": "^3.5.7",

pnpm-lock.yaml

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/build.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { fileURLToPath } from 'node:url'
22
import { cp, mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises'
33
import { beforeAll, describe, it, expect } from 'vitest'
4-
import { execaCommand } from 'execa'
4+
import { exec } from 'tinyexec'
55
import { readPackageJSON } from 'pkg-types'
66
import { dirname, join } from 'pathe'
77
import { findStaticImports } from 'mlly'
@@ -24,8 +24,8 @@ describe('module builder', () => {
2424
await writeFile(moduleSrc, contents)
2525

2626
await Promise.all([
27-
execaCommand('pnpm dev:prepare', { cwd: rootDir }).then(() => execaCommand('pnpm prepack', { cwd: rootDir })),
28-
execaCommand('pnpm dev:prepare', { cwd: secondRootDir }).then(() => execaCommand('pnpm prepack', { cwd: secondRootDir })),
27+
exec('pnpm', ['dev:prepare'], { nodeOptions: { cwd: rootDir } }).then(() => exec('pnpm', ['prepack'], { nodeOptions: { cwd: rootDir } })),
28+
exec('pnpm', ['dev:prepare'], { nodeOptions: { cwd: secondRootDir } }).then(() => exec('pnpm', ['prepack'], { nodeOptions: { cwd: secondRootDir } })),
2929
])
3030
}, 120 * 1000)
3131

0 commit comments

Comments
 (0)