Skip to content

Commit

Permalink
update size-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed May 25, 2021
1 parent ebbcf2b commit 7d96207
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/integration/build-output/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ describe('Build Output', () => {
)
expect(indexSize.endsWith('B')).toBe(true)

expect(parseFloat(indexFirstLoad)).toBeCloseTo(gz ? 63.6 : 195, 1)
expect(parseFloat(indexFirstLoad)).toBeCloseTo(gz ? 63.4 : 195, 1)
expect(indexFirstLoad.endsWith('kB')).toBe(true)

expect(parseFloat(err404Size)).toBeCloseTo(gz ? 3.06 : 8.15, 1)
expect(err404Size.endsWith('kB')).toBe(true)

expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.45 : 203, 1)
expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.3 : 202, 1)
expect(err404FirstLoad.endsWith('kB')).toBe(true)

expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.4 : 195, 1)
expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.2 : 194, 1)
expect(sharedByAll.endsWith('kB')).toBe(true)

const appSizeValue = _appSize.endsWith('kB')
Expand All @@ -144,7 +144,7 @@ describe('Build Output', () => {
const webpackSizeValue = webpackSize.endsWith('kB')
? parseFloat(webpackSize)
: parseFloat(webpackSize) / 1000
expect(webpackSizeValue).toBeCloseTo(gz ? 0.95 : 1.81, 2)
expect(webpackSizeValue).toBeCloseTo(gz ? 0.76 : 1.45, 2)
expect(webpackSize.endsWith('kB') || webpackSize.endsWith(' B')).toBe(
true
)
Expand Down

0 comments on commit 7d96207

Please sign in to comment.