Skip to content

Commit

Permalink
chore: fix nuxt client test script
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlubos committed Jan 9, 2025
1 parent d40cdb8 commit 104fb2d
Show file tree
Hide file tree
Showing 6 changed files with 411 additions and 65 deletions.
2 changes: 1 addition & 1 deletion examples/openapi-ts-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@hey-api/client-nuxt": "workspace:*",
"nuxt": "3.15.0",
"nuxt": "3.15.1",
"vue": "3.5.13",
"vue-router": "4.5.0"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/client-axios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@
"dev": "tsup --watch",
"prepublishOnly": "pnpm build",
"test:coverage": "vitest run --coverage",
"test:types": "vitest --typecheck --watch=false",
"test:update": "vitest watch --update",
"test:watch": "vitest watch",
"test": "vitest run",
"typecheck": "tsc --noEmit"
"typecheck": "vitest --typecheck --watch=false"
},
"peerDependencies": {
"axios": ">= 1.0.0 < 2"
Expand Down
3 changes: 1 addition & 2 deletions packages/client-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@
"dev": "tsup --watch",
"prepublishOnly": "pnpm build",
"test:coverage": "vitest run --coverage",
"test:types": "vitest --typecheck --watch=false",
"test:update": "vitest watch --update",
"test:watch": "vitest watch",
"test": "vitest run",
"typecheck": "tsc --noEmit"
"typecheck": "vitest --typecheck --watch=false"
}
}
6 changes: 3 additions & 3 deletions packages/client-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@
"dev": "tsup --watch",
"prepublishOnly": "pnpm build",
"test:coverage": "vitest run --coverage",
"test:types": "vitest --typecheck --watch=false",
"test:update": "vitest watch --update",
"test:watch": "vitest watch",
"test": "vitest run",
"typecheck": "tsc --noEmit"
"typecheck": "vitest --typecheck --watch=false"
},
"peerDependencies": {
"nuxt": ">= 3.0.0 < 4"
},
"devDependencies": {
"nuxt": "3.15.0"
"@nuxt/test-utils": "3.15.1",
"nuxt": "3.15.1"
}
}
10 changes: 8 additions & 2 deletions packages/client-nuxt/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { fileURLToPath } from 'node:url';

import { defineConfig } from 'vitest/config';
import { defineVitestConfig } from '@nuxt/test-utils/config';

export default defineConfig({
export default defineVitestConfig({
test: {
coverage: {
exclude: ['dist', 'src/**/*.d.ts'],
include: ['src/**/*.ts'],
provider: 'v8',
},
environment: 'nuxt',
environmentOptions: {
nuxt: {
domEnvironment: 'jsdom',
},
},
root: fileURLToPath(new URL('./', import.meta.url)),
},
});
Loading

0 comments on commit 104fb2d

Please sign in to comment.