Skip to content

Commit

Permalink
test: update nuxt build sizes for core-js@3
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 26, 2021
1 parent 276d143 commit 857b02f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/dev/async-config.size-limit.test.js
Expand Up @@ -20,26 +20,26 @@ describe('nuxt basic resources size limit', () => {
it('should stay within the size limit range in legacy mode', async () => {
const legacyResourcesSize = await getResourcesSize(distDir, 'client', { gzip: true, brotli: true })

const LEGACY_JS_RESOURCES_KB_SIZE = 217
const LEGACY_JS_RESOURCES_KB_SIZE = 240
expect(legacyResourcesSize.uncompressed).toBeWithinSize(LEGACY_JS_RESOURCES_KB_SIZE)

const LEGACY_JS_RESOURCES_GZIP_KB_SIZE = 75
const LEGACY_JS_RESOURCES_GZIP_KB_SIZE = 83
expect(legacyResourcesSize.gzip).toBeWithinSize(LEGACY_JS_RESOURCES_GZIP_KB_SIZE)

const LEGACY_JS_RESOURCES_BROTLI_KB_SIZE = 64
const LEGACY_JS_RESOURCES_BROTLI_KB_SIZE = 72
expect(legacyResourcesSize.brotli).toBeWithinSize(LEGACY_JS_RESOURCES_BROTLI_KB_SIZE)
})

it('should stay within the size limit range in modern mode', async () => {
const modernResourcesSize = await getResourcesSize(distDir, 'modern', { gzip: true, brotli: true })

const MODERN_JS_RESOURCES_KB_SIZE = 180
const MODERN_JS_RESOURCES_KB_SIZE = 210
expect(modernResourcesSize.uncompressed).toBeWithinSize(MODERN_JS_RESOURCES_KB_SIZE)

const MODERN_JS_RESOURCES_GZIP_KB_SIZE = 64
const MODERN_JS_RESOURCES_GZIP_KB_SIZE = 73
expect(modernResourcesSize.gzip).toBeWithinSize(MODERN_JS_RESOURCES_GZIP_KB_SIZE)

const MODERN_JS_RESOURCES_BROTLI_KB_SIZE = 58
const MODERN_JS_RESOURCES_BROTLI_KB_SIZE = 64
expect(modernResourcesSize.brotli).toBeWithinSize(MODERN_JS_RESOURCES_BROTLI_KB_SIZE)
})
})

0 comments on commit 857b02f

Please sign in to comment.