Skip to content

Commit

Permalink
Merge branch 'canary' into update/codeowners
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk authored Jun 30, 2021
2 parents 70a785e + b046a05 commit ddccc85
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 138 deletions.
38 changes: 19 additions & 19 deletions test/integration/build-output/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,44 +115,44 @@ describe('Build Output', () => {
expect(parseFloat(size)).toBeGreaterThan(0)
}

const gz = gzipSize !== false
// const gz = gzipSize !== false

expect(parseFloat(indexSize) / 1000).toBeCloseTo(
gz ? 0.251 : 0.394,
2
)
// expect(parseFloat(indexSize) / 1000).toBeCloseTo(
// gz ? 0.251 : 0.394,
// 2
// )
expect(indexSize.endsWith('B')).toBe(true)

expect(parseFloat(indexFirstLoad)).toBeCloseTo(gz ? 64 : 196, 1)
// expect(parseFloat(indexFirstLoad)).toBeCloseTo(gz ? 64 : 196, 1)
expect(indexFirstLoad.endsWith('kB')).toBe(true)

expect(parseFloat(err404Size)).toBeCloseTo(gz ? 3.17 : 8.51, 1)
// expect(parseFloat(err404Size)).toBeCloseTo(gz ? 3.17 : 8.51, 1)
expect(err404Size.endsWith('kB')).toBe(true)

expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.9 : 204, 1)
// expect(parseFloat(err404FirstLoad)).toBeCloseTo(gz ? 66.9 : 204, 1)
expect(err404FirstLoad.endsWith('kB')).toBe(true)

expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.7 : 196, 1)
// expect(parseFloat(sharedByAll)).toBeCloseTo(gz ? 63.7 : 196, 1)
expect(sharedByAll.endsWith('kB')).toBe(true)

const appSizeValue = _appSize.endsWith('kB')
? parseFloat(_appSize)
: parseFloat(_appSize) / 1000
expect(appSizeValue).toBeCloseTo(gz ? 0.799 : 1.63, 1)
// const appSizeValue = _appSize.endsWith('kB')
// ? parseFloat(_appSize)
// : parseFloat(_appSize) / 1000
// expect(appSizeValue).toBeCloseTo(gz ? 0.799 : 1.63, 1)
expect(_appSize.endsWith('kB') || _appSize.endsWith(' B')).toBe(true)

const webpackSizeValue = webpackSize.endsWith('kB')
? parseFloat(webpackSize)
: parseFloat(webpackSize) / 1000
expect(webpackSizeValue).toBeCloseTo(gz ? 0.766 : 1.46, 2)
// const webpackSizeValue = webpackSize.endsWith('kB')
// ? parseFloat(webpackSize)
// : parseFloat(webpackSize) / 1000
// expect(webpackSizeValue).toBeCloseTo(gz ? 0.766 : 1.46, 2)
expect(webpackSize.endsWith('kB') || webpackSize.endsWith(' B')).toBe(
true
)

expect(parseFloat(mainSize)).toBeCloseTo(gz ? 20.1 : 62.7, 1)
// expect(parseFloat(mainSize)).toBeCloseTo(gz ? 20.1 : 62.7, 1)
expect(mainSize.endsWith('kB')).toBe(true)

expect(parseFloat(frameworkSize)).toBeCloseTo(gz ? 42.0 : 130, 1)
// expect(parseFloat(frameworkSize)).toBeCloseTo(gz ? 42.0 : 130, 1)
expect(frameworkSize.endsWith('kB')).toBe(true)
})

Expand Down
17 changes: 0 additions & 17 deletions test/integration/size-limit/next.config.js

This file was deleted.

1 change: 0 additions & 1 deletion test/integration/size-limit/pages/about.js

This file was deleted.

11 changes: 0 additions & 11 deletions test/integration/size-limit/pages/index.js

This file was deleted.

90 changes: 0 additions & 90 deletions test/integration/size-limit/test/index.test.js

This file was deleted.

0 comments on commit ddccc85

Please sign in to comment.