Skip to content

Commit

Permalink
fix(test): pass rootDir to runTests command (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Nov 7, 2023
1 parent b29de19 commit a40650d
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@nuxt/eslint-config": "^0.2.0",
"@nuxt/kit": "^3.8.0",
"@nuxt/schema": "^3.8.0",
"@nuxt/test-utils": "^3.8.1",
"@types/http-proxy": "^1.17.13",
"@types/node": "^20.8.10",
"@types/semver": "^7.5.4",
Expand Down
84 changes: 84 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ export default defineCommand({

const { runTests } = await importTestUtils()
await runTests({
cwd,
rootDir: cwd,
dev: ctx.args.dev,
watch: ctx.args.watch,
.../*ctx.options ||*/ {},
})
},
})

// @ts-ignore TODO
async function importTestUtils(): Promise<typeof import('@nuxt/test-utils')> {
let err
for (const pkg of [
Expand Down

0 comments on commit a40650d

Please sign in to comment.