From ba320a55898c8b2209c530202e19b17f8eab83bc Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 25 Apr 2023 10:20:11 +0100 Subject: [PATCH] test: exclude default error pages from bundle test --- test/bundle.test.ts | 9 +++------ test/fixtures/minimal/error.vue | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 test/fixtures/minimal/error.vue diff --git a/test/bundle.test.ts b/test/bundle.test.ts index b708de8b61..d20a60ec79 100644 --- a/test/bundle.test.ts +++ b/test/bundle.test.ts @@ -34,13 +34,10 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e it('default client bundle size', async () => { stats.client = await analyzeSizes('**/*.js', publicDir) - expect(roundToKilobytes(stats.client.totalBytes)).toMatchInlineSnapshot('"105k"') + expect(roundToKilobytes(stats.client.totalBytes)).toMatchInlineSnapshot('"94.0k"') expect(stats.client.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(` [ - "_nuxt/_plugin-vue_export-helper.js", "_nuxt/entry.js", - "_nuxt/error-404.js", - "_nuxt/error-500.js", "_nuxt/error-component.js", ] `) @@ -48,10 +45,10 @@ describe.skipIf(isWindows || process.env.TEST_BUILDER === 'webpack' || process.e it('default server bundle size', async () => { stats.server = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir) - expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"92.4k"') + expect(roundToKilobytes(stats.server.totalBytes)).toMatchInlineSnapshot('"67.2k"') const modules = await analyzeSizes('node_modules/**/*', serverDir) - expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2657k"') + expect(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot('"2653k"') const packages = modules.files .filter(m => m.endsWith('package.json')) diff --git a/test/fixtures/minimal/error.vue b/test/fixtures/minimal/error.vue new file mode 100644 index 0000000000..17b1009956 --- /dev/null +++ b/test/fixtures/minimal/error.vue @@ -0,0 +1,3 @@ +