From 41319be4bd5939d6390794c87ca1a1530d99d41d Mon Sep 17 00:00:00 2001 From: Suejung Shin Date: Fri, 6 Sep 2024 09:39:35 -0700 Subject: [PATCH] fix integration tests --- .../__snapshots__/nuxt-plugin.test.ts.snap | 36 +++++++++--------- .../remix/vite-base.config.ts | 1 - .../sveltekit/vite-base.config.ts | 1 - .../__snapshots__/webpack-plugin.test.ts.snap | 8 ++-- integration-tests/package.json | 6 +-- integration-tests/test-api/bun.lockb | Bin 3814 -> 3387 bytes integration-tests/test-api/package.json | 3 +- integration-tests/test-api/tsconfig.json | 1 - .../test-apps/nuxt/nuxt.config.ts | 30 --------------- integration-tests/test-apps/nuxt/package.json | 2 +- .../test-apps/sveltekit/package.json | 2 +- 11 files changed, 28 insertions(+), 62 deletions(-) delete mode 100644 integration-tests/test-apps/nuxt/nuxt.config.ts diff --git a/integration-tests/fixtures/generate-bundle-stats/nuxt/__snapshots__/nuxt-plugin.test.ts.snap b/integration-tests/fixtures/generate-bundle-stats/nuxt/__snapshots__/nuxt-plugin.test.ts.snap index 315ebf58..d0664733 100644 --- a/integration-tests/fixtures/generate-bundle-stats/nuxt/__snapshots__/nuxt-plugin.test.ts.snap +++ b/integration-tests/fixtures/generate-bundle-stats/nuxt/__snapshots__/nuxt-plugin.test.ts.snap @@ -7,7 +7,7 @@ exports[`Generating nuxt stats 3 {"format":"amd","expected":"amd"} matches the s "bundleName": StringContaining "test-nuxt-v3-client-amd", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -28,7 +28,7 @@ exports[`Generating nuxt stats 3 {"format":"amd","expected":"amd"} matches the s "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -49,7 +49,7 @@ exports[`Generating nuxt stats 3 {"format":"cjs","expected":"cjs"} matches the s "bundleName": StringContaining "test-nuxt-v3-client-cjs", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -70,7 +70,7 @@ exports[`Generating nuxt stats 3 {"format":"cjs","expected":"cjs"} matches the s "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -91,7 +91,7 @@ exports[`Generating nuxt stats 3 {"format":"es","expected":"esm"} matches the sn "bundleName": StringContaining "test-nuxt-v3-client-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -112,7 +112,7 @@ exports[`Generating nuxt stats 3 {"format":"es","expected":"esm"} matches the sn "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -133,7 +133,7 @@ exports[`Generating nuxt stats 3 {"format":"esm","expected":"esm"} matches the s "bundleName": StringContaining "test-nuxt-v3-client-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -154,7 +154,7 @@ exports[`Generating nuxt stats 3 {"format":"esm","expected":"esm"} matches the s "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -175,7 +175,7 @@ exports[`Generating nuxt stats 3 {"format":"module","expected":"esm"} matches th "bundleName": StringContaining "test-nuxt-v3-client-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -196,7 +196,7 @@ exports[`Generating nuxt stats 3 {"format":"module","expected":"esm"} matches th "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -217,7 +217,7 @@ exports[`Generating nuxt stats 3 {"format":"iife","expected":"iife"} matches the "bundleName": StringContaining "test-nuxt-v3-client-iife", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -238,7 +238,7 @@ exports[`Generating nuxt stats 3 {"format":"iife","expected":"iife"} matches the "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -259,7 +259,7 @@ exports[`Generating nuxt stats 3 {"format":"umd","expected":"umd"} matches the s "bundleName": StringContaining "test-nuxt-v3-client-umd", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -280,7 +280,7 @@ exports[`Generating nuxt stats 3 {"format":"umd","expected":"umd"} matches the s "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -301,7 +301,7 @@ exports[`Generating nuxt stats 3 {"format":"system","expected":"system"} matches "bundleName": StringContaining "test-nuxt-v3-client-system", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -322,7 +322,7 @@ exports[`Generating nuxt stats 3 {"format":"system","expected":"system"} matches "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -343,7 +343,7 @@ exports[`Generating nuxt stats 3 {"format":"systemjs","expected":"system"} match "bundleName": StringContaining "test-nuxt-v3-client-system", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, @@ -364,7 +364,7 @@ exports[`Generating nuxt stats 3 {"format":"systemjs","expected":"system"} match "bundleName": StringContaining "test-nuxt-v3-server-esm", "bundler": { "name": "rollup", - "version": "4.21.2", + "version": "4.16.2", }, "chunks": ExpectArrayContaining {}, "duration": Any, diff --git a/integration-tests/fixtures/generate-bundle-stats/remix/vite-base.config.ts b/integration-tests/fixtures/generate-bundle-stats/remix/vite-base.config.ts index 901cbcaf..592ccfa4 100644 --- a/integration-tests/fixtures/generate-bundle-stats/remix/vite-base.config.ts +++ b/integration-tests/fixtures/generate-bundle-stats/remix/vite-base.config.ts @@ -12,7 +12,6 @@ export default defineConfig({ }, }, plugins: [ - //@ts-expect-error handle conflicting vite version types remix({ future: { v3_fetcherPersist: true, diff --git a/integration-tests/fixtures/generate-bundle-stats/sveltekit/vite-base.config.ts b/integration-tests/fixtures/generate-bundle-stats/sveltekit/vite-base.config.ts index 459ccd2d..7d900a88 100644 --- a/integration-tests/fixtures/generate-bundle-stats/sveltekit/vite-base.config.ts +++ b/integration-tests/fixtures/generate-bundle-stats/sveltekit/vite-base.config.ts @@ -14,7 +14,6 @@ export default defineConfig({ }, }, plugins: [ - //@ts-expect-error handle conflicting vite version types sveltekit(), codecovSvelteKitPlugin({ enableBundleAnalysis: true, diff --git a/integration-tests/fixtures/generate-bundle-stats/webpack/__snapshots__/webpack-plugin.test.ts.snap b/integration-tests/fixtures/generate-bundle-stats/webpack/__snapshots__/webpack-plugin.test.ts.snap index 053be10e..780ba9f1 100644 --- a/integration-tests/fixtures/generate-bundle-stats/webpack/__snapshots__/webpack-plugin.test.ts.snap +++ b/integration-tests/fixtures/generate-bundle-stats/webpack/__snapshots__/webpack-plugin.test.ts.snap @@ -150,7 +150,7 @@ exports[`Generating webpack stats 5 {"format":"commonjs","expected":"cjs"} match } `; -exports[`Generating webpack stats 5 source maps are enabled does not include any source maps 1`] = ` +exports[`Generating webpack stats 5 {"format":"module","expected":"esm"} matches the snapshot 1`] = ` { "assets": [ { @@ -161,7 +161,7 @@ exports[`Generating webpack stats 5 source maps are enabled does not include any }, ], "builtAt": Any, - "bundleName": StringNotContaining ".map", + "bundleName": StringContaining "test-webpack-v5-esm", "bundler": { "name": "webpack", "version": "5.90.0", @@ -225,7 +225,7 @@ exports[`Generating webpack stats 5 source maps are enabled does not include any } `; -exports[`Generating webpack stats 5 {"format":"module","expected":"esm"} matches the snapshot 1`] = ` +exports[`Generating webpack stats 5 source maps are enabled does not include any source maps 1`] = ` { "assets": [ { @@ -236,7 +236,7 @@ exports[`Generating webpack stats 5 {"format":"module","expected":"esm"} matches }, ], "builtAt": Any, - "bundleName": StringContaining "test-webpack-v5-esm", + "bundleName": StringNotContaining ".map", "bundler": { "name": "webpack", "version": "5.90.0", diff --git a/integration-tests/package.json b/integration-tests/package.json index 91ce8d35..b5e0dad4 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -43,12 +43,12 @@ "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", "@solidjs/start": "^1.0.6", - "@sveltejs/kit": "^2.5.25", + "@sveltejs/kit": "^2.0.0", "@types/bun": "^1.0.6", "@types/node": "^20.11.15", - "bun": "^1.1.24", + "bun": "^1.1.4", "isbot": "^4.1.0", - "nuxt": "3.12.4", + "nuxt": "3.11.2", "react": "^18.2.0", "react-dom": "^18.2.0", "rollupV3": "npm:rollup@3.29.4", diff --git a/integration-tests/test-api/bun.lockb b/integration-tests/test-api/bun.lockb index a53863fb02e0295a0da87654a69b07d1e6f1cdcc..e7a02a8202d9916d24145d46331b9b7337b438a4 100755 GIT binary patch delta 748 zcmaDRyIX34o~DMK#Oq6JJ6N0jj|hB!x<^C!g~#Dj2h_O!UYPVFQt4^KY90nK;FuUL zU!TDN;ULJ2{JeY^kBfn!p#aF?1k(GU^kyK<4dk0JGB5y5YJl-!ddhQE_iL{83OU85 zx!2pE@k{la^s^m8uay>`o>4hJ>r&=K{it5Gt+tk&`8LO1aR<)Y4HK9w!05rqH93;e zp2?bF@+~Gir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O7M4#SaUW0#p~~W = defineNuxtConfig({ - buildDir: `distV3`, - ssr: true, - modules: [ - [ - "@codecov/nuxt-plugin", - { - enableBundleAnalysis: true, - bundleName: "test-nuxt-v3", - uploadToken: "test-token", - apiUrl: process.env.API_URL, - }, - ], - ], - vite: { - clearScreen: false, - build: { - sourcemap: false, - rollupOptions: { - output: { - format: "systemjs", - }, - }, - }, - }, -}); - -export default config; diff --git a/integration-tests/test-apps/nuxt/package.json b/integration-tests/test-apps/nuxt/package.json index 95ac1101..913bba41 100644 --- a/integration-tests/test-apps/nuxt/package.json +++ b/integration-tests/test-apps/nuxt/package.json @@ -9,7 +9,7 @@ "preview": "nuxt preview" }, "dependencies": { - "nuxt": "^3.12.4", + "nuxt": "^3.11.2", "vue": "^3.4.21", "vue-router": "^4.3.0" }, diff --git a/integration-tests/test-apps/sveltekit/package.json b/integration-tests/test-apps/sveltekit/package.json index 97d22be6..e2cf2e39 100644 --- a/integration-tests/test-apps/sveltekit/package.json +++ b/integration-tests/test-apps/sveltekit/package.json @@ -11,7 +11,7 @@ "@fontsource/fira-mono": "^4.5.10", "@neoconfetti/svelte": "^1.0.0", "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/kit": "^2.5.25", + "@sveltejs/kit": "^2.0.0", "@sveltejs/vite-plugin-svelte": "^3.0.0", "svelte": "^4.2.7", "vite": "^5.0.3"