diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 5546f414..94a6a27f 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -25,10 +25,10 @@ jobs: run: pnpm install - name: Run linters run: pnpm lint - # - name: Test and create coverage - # run: pnpm coverage - # - name: Upload coverage reports to Codecov - # uses: codecov/codecov-action@v3 + - name: Test and create coverage + run: pnpm coverage + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 - name: Build for production run: pnpm generate - name: E2E testing @@ -56,11 +56,11 @@ jobs: with: name: dist path: .output/public - # - name: Archive code coverage results - # uses: actions/upload-artifact@v3 - # with: - # name: code-coverage-report - # path: coverage + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: code-coverage-report + path: coverage deploy_azure_static_web_apps: runs-on: ubuntu-latest diff --git a/components/ProtectedImage.spec.ts b/components/ProtectedImage.spec.ts index 20ccf62f..f8c4ded2 100644 --- a/components/ProtectedImage.spec.ts +++ b/components/ProtectedImage.spec.ts @@ -2,13 +2,10 @@ import { describe, it, expect } from "vitest"; import { flushPromises, mount } from "@vue/test-utils"; -import { setup } from "@nuxt/test-utils"; import { AUTH0_INJECTION_KEY, Auth0VueClient } from "@auth0/auth0-vue"; import ProtectedImage from "./ProtectedImage.vue"; -describe("component ProtectedImage", async () => { - await setup({}); - +describe("component ProtectedImage", () => { it("should add the access token to the given path", async () => { // Arrange const src = "http://localhost/image.jpg"; diff --git a/components/playlist/PlaylistOverview.spec.ts b/components/playlist/PlaylistOverview.spec.ts index c6da2846..9730cd62 100644 --- a/components/playlist/PlaylistOverview.spec.ts +++ b/components/playlist/PlaylistOverview.spec.ts @@ -1,43 +1,37 @@ // @vitest-environment happy-dom -import { PlaylistApi } from "@bcc-code/bmm-sdk-fetch"; -import { describe, it, expect, vi, afterEach } from "vitest"; +import { PlaylistModel } from "@bcc-code/bmm-sdk-fetch"; +import { describe, it, expect } from "vitest"; import { RouterLinkStub, flushPromises, mount } from "@vue/test-utils"; -import { setup } from "@nuxt/test-utils"; import PlaylistOverview from "./PlaylistOverview.vue"; -describe("component PlaylistOverview", async () => { - await setup({}); - - afterEach(() => { - vi.clearAllMocks(); - }); - +describe("component PlaylistOverview", () => { it("should list the playlists in the order given by the api", async () => { // Arrange - vi.spyOn(PlaylistApi.prototype, "playlistGet").mockReturnValueOnce( - Promise.resolve([ - { - id: 10, - type: "playlist", - title: "TestSamplePlaylist1", - }, - { - id: 12, - type: "playlist", - title: "TestSamplePlaylist2", - }, - { - id: 11, - type: "playlist", - title: "TestSamplePlaylist3", - }, - ]) - ); + const playlists: PlaylistModel[] = [ + { + id: 10, + type: "playlist", + title: "TestSamplePlaylist1", + }, + { + id: 12, + type: "playlist", + title: "TestSamplePlaylist2", + }, + { + id: 11, + type: "playlist", + title: "TestSamplePlaylist3", + }, + ]; // Act const wrapper = mount(PlaylistOverview, { - global: { stubs: { RouterLink: RouterLinkStub } }, + props: { + playlists, + }, + global: { stubs: { NuxtLink: RouterLinkStub } }, }); await flushPromises(); diff --git a/nuxt.config.ts b/nuxt.config.ts index c344abdd..002b20ff 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -7,6 +7,7 @@ const modules: (string | any)[] = [ "./modules/figma2tailwind", // Must be placed before "@nuxtjs/tailwindcss" "@nuxtjs/tailwindcss", "@nuxtjs/i18n", + "nuxt-vitest", ["@pinia/nuxt", { autoImports: ["defineStore"] }], ]; diff --git a/package.json b/package.json index 1b6dab43..8c12e9db 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "@intlify/eslint-plugin-vue-i18n": "^2.0.0", "@nuxt/devtools": "^0.4.1", "@nuxt/kit": "^3.4.3", - "@nuxt/test-utils": "^3.4.2", "@nuxtjs/eslint-config-typescript": "^12.0.0", "@nuxtjs/i18n": "8.0.0-beta.10", "@nuxtjs/tailwindcss": "^6.6.6", @@ -45,6 +44,7 @@ "nuxt": "^3.4.1", "nuxt-electron": "^0.4.5", "nuxt-typed-router": "^3.2.0", + "nuxt-vitest": "^0.7.0", "prettier": "^2.8.7", "prettier-plugin-tailwindcss": "^0.2.7", "stylelint": "^15.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5d01c4f8..d0fedad7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,7 +3,7 @@ lockfileVersion: '6.0' dependencies: '@auth0/auth0-vue': specifier: ^2.2.0 - version: 2.2.0 + version: 2.2.0(vue-router@4.1.6) '@bcc-code/bmm-sdk-fetch': specifier: ^6.1.1 version: 6.1.1 @@ -24,15 +24,12 @@ devDependencies: '@nuxt/kit': specifier: ^3.4.3 version: 3.4.3 - '@nuxt/test-utils': - specifier: ^3.4.2 - version: 3.4.2(vitest@0.30.1)(vue@3.2.47) '@nuxtjs/eslint-config-typescript': specifier: ^12.0.0 version: 12.0.0(eslint@8.39.0)(typescript@4.9.5) '@nuxtjs/i18n': specifier: 8.0.0-beta.10 - version: 8.0.0-beta.10(vue@3.2.47) + version: 8.0.0-beta.10(vue-router@4.1.6)(vue@3.2.47) '@nuxtjs/tailwindcss': specifier: ^6.6.6 version: 6.6.6(webpack@5.80.0) @@ -78,6 +75,9 @@ devDependencies: nuxt-typed-router: specifier: ^3.2.0 version: 3.2.0 + nuxt-vitest: + specifier: ^0.7.0 + version: 0.7.0(@vitejs/plugin-vue-jsx@3.0.1)(@vitejs/plugin-vue@4.1.0)(happy-dom@9.9.2)(vite@4.3.1)(vue-router@4.1.6)(vue@3.2.47) prettier: specifier: ^2.8.7 version: 2.8.7 @@ -127,7 +127,7 @@ packages: resolution: {integrity: sha512-NgD6Fkm5Xnbned1VjhEW8irm1/Y8AWtdSLexgLXNwwBVgfnYicCVBu8w75m2t+4QljXkTcI7IXVEFhVmxMuxaA==} dev: false - /@auth0/auth0-vue@2.2.0: + /@auth0/auth0-vue@2.2.0(vue-router@4.1.6): resolution: {integrity: sha512-a8kNj9wF/hJFD/izAZojOTNlny/sq3qvuV8KLUreoQ92uMQBYiHtuclVHbRqoYxl2bwCtFJccttEmyYW3gzHDA==} peerDependencies: vue-router: ^4.0.12 @@ -137,6 +137,7 @@ packages: dependencies: '@auth0/auth0-spa-js': 2.0.4 vue: 3.2.47 + vue-router: 4.1.6(vue@3.2.47) dev: false /@babel/code-frame@7.21.4: @@ -1067,7 +1068,7 @@ packages: vue-i18n: 9.3.0-beta.16(vue@3.2.47) dev: true - /@intlify/vue-router-bridge@0.8.0(vue@3.2.47): + /@intlify/vue-router-bridge@0.8.0(vue-router@4.1.6)(vue@3.2.47): resolution: {integrity: sha512-CNxOgvyQcRhtGmRrksicL+HGjDijXtz+J/x04C/RslZ74CFdZkxjCe8MABkeD3xr+ry8G8tCm2nV2hLjZbynQw==} engines: {node: '>= 12'} hasBin: true @@ -1082,6 +1083,7 @@ packages: optional: true dependencies: vue-demi: 0.13.11(vue@3.2.47) + vue-router: 4.1.6(vue@3.2.47) transitivePeerDependencies: - vue dev: true @@ -1442,7 +1444,7 @@ packages: pathe: 1.1.0 pkg-types: 1.0.2 postcss-import-resolver: 2.0.0 - std-env: 3.3.2 + std-env: 3.3.3 ufo: 1.1.1 unimport: 3.0.6 untyped: 1.3.2 @@ -1491,39 +1493,7 @@ packages: ofetch: 1.0.1 parse-git-config: 3.0.0 rc9: 2.1.0 - std-env: 3.3.2 - transitivePeerDependencies: - - rollup - - supports-color - dev: true - - /@nuxt/test-utils@3.4.2(vitest@0.30.1)(vue@3.2.47): - resolution: {integrity: sha512-yJGvHD1m8KUMwzgcYYwDySIh4L/6oj+2819t/wHRQM1vCgL/iyynQ9B/Wq9ddb83q5LX0PK+k9eVylA277e9fQ==} - engines: {node: ^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} - peerDependencies: - '@jest/globals': ^29.5.0 - playwright: ^1.32.3 - vitest: ^0.30.1 - vue: ^3.2.47 - peerDependenciesMeta: - '@jest/globals': - optional: true - playwright: - optional: true - vitest: - optional: true - dependencies: - '@nuxt/kit': 3.4.2 - '@nuxt/schema': 3.4.2 - consola: 3.1.0 - defu: 6.1.2 - execa: 7.1.1 - get-port-please: 3.0.1 - ofetch: 1.0.1 - pathe: 1.1.0 - ufo: 1.1.1 - vitest: 0.30.1(happy-dom@9.9.2) - vue: 3.2.47 + std-env: 3.3.3 transitivePeerDependencies: - rollup - supports-color @@ -1553,7 +1523,7 @@ packages: externality: 1.0.0 fs-extra: 11.1.1 get-port-please: 3.0.1 - h3: 1.6.4 + h3: 1.6.6 knitwork: 1.0.0 magic-string: 0.30.0 mlly: 1.2.0 @@ -1565,9 +1535,9 @@ packages: postcss-import: 15.1.0(postcss@8.4.23) postcss-url: 10.1.3(postcss@8.4.23) rollup-plugin-visualizer: 5.9.0 - std-env: 3.3.2 + std-env: 3.3.3 strip-literal: 1.0.1 - ufo: 1.1.1 + ufo: 1.1.2 unplugin: 1.3.1 vite: 4.3.1(@types/node@18.15.13) vite-node: 0.30.1(@types/node@18.15.13) @@ -1633,7 +1603,7 @@ packages: - supports-color dev: true - /@nuxtjs/i18n@8.0.0-beta.10(vue@3.2.47): + /@nuxtjs/i18n@8.0.0-beta.10(vue-router@4.1.6)(vue@3.2.47): resolution: {integrity: sha512-a7xcWKSJvABxF6O7W7MKscyT3OJxaKpBQZ84PGuTop9YrlBFkTV+bUQX3cayQqd0EYVLjgdE9R0uri5JMIVQWQ==} engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} dependencies: @@ -1655,7 +1625,7 @@ packages: ufo: 1.1.1 unplugin: 1.3.1 vue-i18n: 9.3.0-beta.16(vue@3.2.47) - vue-i18n-routing: 0.12.2(vue-i18n@9.3.0-beta.16)(vue@3.2.47) + vue-i18n-routing: 0.12.2(vue-i18n@9.3.0-beta.16)(vue-router@4.1.6)(vue@3.2.47) transitivePeerDependencies: - '@vue/composition-api' - petite-vue-i18n @@ -2366,6 +2336,18 @@ packages: tinyspy: 2.1.0 dev: true + /@vitest/ui@0.30.1: + resolution: {integrity: sha512-Izz4ElDmdvX02KImSC2nCJI6CsGo9aETbKqxli55M0rbbPPAMtF0zDcJIqgEP5V6Y+4Ysf6wvsjLbLCTnaBvKw==} + dependencies: + '@vitest/utils': 0.30.1 + fast-glob: 3.2.12 + fflate: 0.7.4 + flatted: 3.2.7 + pathe: 1.1.0 + picocolors: 1.0.0 + sirv: 2.0.2 + dev: true + /@vitest/utils@0.30.1: resolution: {integrity: sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==} dependencies: @@ -3857,6 +3839,10 @@ packages: resolution: {integrity: sha512-RyZrFi6PNpBFbIaQjXDlFIhFVqV42QeKSZX1yQIl6ihImq6vcHNGMtqQ/QzY3RMPuYSkvsRwtnt5M9NeYxKt0g==} dev: true + /cookie-es@1.0.0: + resolution: {integrity: sha512-mWYvfOLrfEc996hlKcdABeIiPHUPC6DM2QYZdGGOvhOTbA3tjm2eBwqlJpoFdjC89NI4Qt6h0Pu06Mp+1Pj5OQ==} + dev: true + /cookies@0.8.0: resolution: {integrity: sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==} engines: {node: '>= 0.8'} @@ -5360,7 +5346,7 @@ packages: enhanced-resolve: 5.13.0 mlly: 1.2.0 pathe: 1.1.0 - ufo: 1.1.1 + ufo: 1.1.2 dev: true /extract-zip@2.0.1: @@ -5446,6 +5432,10 @@ packages: web-streams-polyfill: 3.2.1 dev: true + /fflate@0.7.4: + resolution: {integrity: sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==} + dev: true + /figures@3.2.0: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} @@ -5985,6 +5975,29 @@ packages: uncrypto: 0.1.2 dev: true + /h3@1.6.6: + resolution: {integrity: sha512-DWu2s11OuuO9suEkX99dXaJoxd1RgPXiM4iDmLdrhGV63GLoav13f3Kdd5/Rw7xNKzhzn2+F2dleQjG66SnMPQ==} + dependencies: + cookie-es: 1.0.0 + defu: 6.1.2 + destr: 1.2.2 + iron-webcrypto: 0.7.0 + radix3: 1.0.1 + ufo: 1.1.2 + uncrypto: 0.1.2 + dev: true + + /happy-dom@9.18.3: + resolution: {integrity: sha512-b7iMGYeIXvUryNultA0AHEVU0FPpb2djJ/xSVlMDfP7HG4z7FomdqkCEpWtSv1zDL+t1gRUoBbpqFCoUBvjYtg==} + dependencies: + css.escape: 1.5.1 + entities: 4.5.0 + iconv-lite: 0.6.3 + webidl-conversions: 7.0.0 + whatwg-encoding: 2.0.0 + whatwg-mimetype: 3.0.0 + dev: true + /happy-dom@9.9.2: resolution: {integrity: sha512-E+FouJ18tckCe04ky6mMtNEGGoXZrY+UFqHICNarQB+fCb4RtZeRbp2IOmoIYaQRjb5Iu3ChLNsLBnB8aA3vjA==} dependencies: @@ -6376,6 +6389,10 @@ packages: resolution: {integrity: sha512-WYgEQttulX/+JTv1BTJFYY3OsAb+ZnCuA53IjppZMyiRsVdGeEuZ/k4fJrg77Rzn0pp9/PgWtXUF+5HndDA5SQ==} dev: true + /iron-webcrypto@0.7.0: + resolution: {integrity: sha512-WkX32iTcwd79ZsWRPP5wq1Jq6XXfPwO783ZiUBY8uMw4/AByx5WvBmxvYGnpVt6AOVJ0F41Qo420r8lIneT9Wg==} + dev: true + /is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -7031,7 +7048,7 @@ packages: http-shutdown: 1.2.2 ip-regex: 5.0.0 node-forge: 1.3.1 - ufo: 1.1.1 + ufo: 1.1.2 dev: true /listr2@3.14.0(enquirer@2.3.6): @@ -7710,7 +7727,7 @@ packages: fs-extra: 11.1.1 globby: 13.1.4 gzip-size: 7.0.0 - h3: 1.6.4 + h3: 1.6.6 hookable: 5.5.3 http-proxy: 1.18.1 is-primitive: 3.0.1 @@ -7736,8 +7753,8 @@ packages: serve-placeholder: 2.0.1 serve-static: 1.15.0 source-map-support: 0.5.21 - std-env: 3.3.2 - ufo: 1.1.1 + std-env: 3.3.3 + ufo: 1.1.2 unenv: 1.4.1 unimport: 3.0.6(rollup@3.20.7) unstorage: 1.5.0 @@ -8035,6 +8052,42 @@ packages: - supports-color dev: true + /nuxt-vitest@0.7.0(@vitejs/plugin-vue-jsx@3.0.1)(@vitejs/plugin-vue@4.1.0)(happy-dom@9.9.2)(vite@4.3.1)(vue-router@4.1.6)(vue@3.2.47): + resolution: {integrity: sha512-6RS7LevghXBUJudnJ3UMNGTl9j6uXXcGyTL00pFVrZ33Ynk5iUEBPwUedn/V0w4iWvqxeKwx3bAkN+BhHz5a1Q==} + peerDependencies: + '@vitejs/plugin-vue': '*' + '@vitejs/plugin-vue-jsx': '*' + vite: '*' + dependencies: + '@nuxt/kit': 3.4.3 + '@vitejs/plugin-vue': 4.1.0(vite@4.3.1)(vue@3.2.47) + '@vitejs/plugin-vue-jsx': 3.0.1(vite@4.3.1)(vue@3.2.47) + '@vitest/ui': 0.30.1 + get-port-please: 3.0.1 + perfect-debounce: 1.0.0 + std-env: 3.3.3 + vite: 4.3.1(@types/node@18.15.13) + vitest: 0.30.1(@vitest/ui@0.30.1)(happy-dom@9.9.2) + vitest-environment-nuxt: 0.7.0(vitest@0.30.1)(vue-router@4.1.6)(vue@3.2.47) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@vitest/browser' + - happy-dom + - jsdom + - less + - playwright + - rollup + - safaridriver + - sass + - stylus + - sugarss + - supports-color + - terser + - vue + - vue-router + - webdriverio + dev: true + /nuxt@3.4.2(@types/node@18.15.13)(eslint@8.39.0)(stylelint@15.5.0)(typescript@4.9.5)(vue-tsc@1.6.4): resolution: {integrity: sha512-4v+oeBL4ZI8nHzF0Dm1p5kF9VCNlzrpvOt7wu3BnmzlueXsu4A/LfmFvpfZLxws+r5U74eM5Ut/LMD8B8LrZIw==} engines: {node: ^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0} @@ -8466,6 +8519,10 @@ packages: /perfect-debounce@0.1.3: resolution: {integrity: sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ==} + /perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + dev: true + /performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} dev: true @@ -9934,6 +9991,10 @@ packages: /std-env@3.3.2: resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==} + /std-env@3.3.3: + resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} + dev: true + /stdin-discarder@0.1.0: resolution: {integrity: sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -10679,6 +10740,10 @@ packages: /ufo@1.1.1: resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==} + /ufo@1.1.2: + resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} + dev: true + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -10828,14 +10893,14 @@ packages: anymatch: 3.1.3 chokidar: 3.5.3 destr: 1.2.2 - h3: 1.6.4 + h3: 1.6.6 ioredis: 5.3.2 listhen: 1.0.4 lru-cache: 9.1.0 mri: 1.2.0 node-fetch-native: 1.1.0 ofetch: 1.0.1 - ufo: 1.1.1 + ufo: 1.1.2 transitivePeerDependencies: - supports-color dev: true @@ -11111,6 +11176,98 @@ packages: fsevents: 2.3.2 dev: true + /vitest-environment-nuxt@0.7.0(vitest@0.30.1)(vue-router@4.1.6)(vue@3.2.47): + resolution: {integrity: sha512-y99McobcS14Afjw7QxCBrCujS70hRBRiNmJ3HPXdW5rch0KRVLmVNLMFyyCsjS8OHtlxamn4niTVVv5z/DAspQ==} + peerDependencies: + vitest: ^0.24.5 || ^0.26.0 || ^0.27.0 || ^0.28.0 || ^0.29.0 || ^0.30.0 + vue: ^3.2.45 + vue-router: ^4.0.0 + dependencies: + '@nuxt/kit': 3.4.3 + '@vue/test-utils': 2.3.2(vue@3.2.47) + defu: 6.1.2 + estree-walker: 3.0.3 + h3: 1.6.6 + happy-dom: 9.18.3 + magic-string: 0.30.0 + ofetch: 1.0.1 + unenv: 1.4.1 + vitest: 0.30.1(@vitest/ui@0.30.1)(happy-dom@9.9.2) + vue: 3.2.47 + vue-router: 4.1.6(vue@3.2.47) + transitivePeerDependencies: + - rollup + - supports-color + dev: true + + /vitest@0.30.1(@vitest/ui@0.30.1)(happy-dom@9.9.2): + resolution: {integrity: sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==} + engines: {node: '>=v14.18.0'} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@vitest/browser': '*' + '@vitest/ui': '*' + happy-dom: '*' + jsdom: '*' + playwright: '*' + safaridriver: '*' + webdriverio: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + dependencies: + '@types/chai': 4.3.4 + '@types/chai-subset': 1.3.3 + '@types/node': 18.15.13 + '@vitest/expect': 0.30.1 + '@vitest/runner': 0.30.1 + '@vitest/snapshot': 0.30.1 + '@vitest/spy': 0.30.1 + '@vitest/ui': 0.30.1 + '@vitest/utils': 0.30.1 + acorn: 8.8.2 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.7 + concordance: 5.0.4 + debug: 4.3.4 + happy-dom: 9.9.2 + local-pkg: 0.4.3 + magic-string: 0.30.0 + pathe: 1.1.0 + picocolors: 1.0.0 + source-map: 0.6.1 + std-env: 3.3.2 + strip-literal: 1.0.1 + tinybench: 2.4.0 + tinypool: 0.4.0 + vite: 4.3.1(@types/node@18.15.13) + vite-node: 0.30.1(@types/node@18.15.13) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /vitest@0.30.1(happy-dom@9.9.2): resolution: {integrity: sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==} engines: {node: '>=v14.18.0'} @@ -11221,7 +11378,7 @@ packages: /vue-bundle-renderer@1.0.3: resolution: {integrity: sha512-EfjX+5TTUl70bki9hPuVp+54JiZOvFIfoWBcfXsSwLzKEiDYyHNi5iX8srnqLIv3YRnvxgbntdcG1WPq0MvffQ==} dependencies: - ufo: 1.1.1 + ufo: 1.1.2 dev: true /vue-demi@0.13.11(vue@3.2.47): @@ -11276,7 +11433,7 @@ packages: - supports-color dev: true - /vue-i18n-routing@0.12.2(vue-i18n@9.3.0-beta.16)(vue@3.2.47): + /vue-i18n-routing@0.12.2(vue-i18n@9.3.0-beta.16)(vue-router@4.1.6)(vue@3.2.47): resolution: {integrity: sha512-VzYUzbUJyPHUP74t973dN42/sJnZUzBwdcYX+TJgr9YHD08+9uouw5Ume2jHO2Pi8Nymu4cz/UiHWDPeMyc/bQ==} engines: {node: '>= 14.6'} peerDependencies: @@ -11299,11 +11456,12 @@ packages: dependencies: '@intlify/shared': 9.3.0-beta.17 '@intlify/vue-i18n-bridge': 0.8.0(vue-i18n@9.3.0-beta.16) - '@intlify/vue-router-bridge': 0.8.0(vue@3.2.47) - ufo: 1.1.1 + '@intlify/vue-router-bridge': 0.8.0(vue-router@4.1.6)(vue@3.2.47) + ufo: 1.1.2 vue: 3.2.47 vue-demi: 0.13.11(vue@3.2.47) vue-i18n: 9.3.0-beta.16(vue@3.2.47) + vue-router: 4.1.6(vue@3.2.47) dev: true /vue-i18n@9.3.0-beta.16(vue@3.2.47): @@ -11326,7 +11484,6 @@ packages: dependencies: '@vue/devtools-api': 6.5.0 vue: 3.2.47 - dev: true /vue-template-compiler@2.7.14: resolution: {integrity: sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..44bcb123 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,8 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import { defineVitestConfig } from "nuxt-vitest/config"; + +export default defineVitestConfig({ + test: { + environment: "nuxt", + }, +});