Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
chore: add test variation for parseWithEsbuild feature flag (#699)
Browse files Browse the repository at this point in the history
* chore: add test variation for `parseWithEsbuild` feature flag

* chore: temporarily disable bundler_default variation

* chore: reinstate bundler_default variation

* chore: run some tests in serial
  • Loading branch information
eduardoboucas committed Oct 5, 2021
1 parent 1f92fc4 commit e38f0a0
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 276 deletions.
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"adm-zip": "0.5.5",
"ava": "^3.0.0",
"cpy": "^8.0.0",
"deepmerge": "^4.2.2",
"get-stream": "^6.0.0",
"husky": "^4.3.8",
"npm-run-all": "^4.1.5",
Expand Down
9 changes: 8 additions & 1 deletion tests/helpers/test_many.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { platform } = require('process')

const makeTestMany = (test, matrix) => {
const testBundlers = (title, variationNames, assertions, testFn = test) => {
variationNames.forEach((name) => {
Expand All @@ -9,7 +11,12 @@ const makeTestMany = (test, matrix) => {

const testTitle = `${title} [${name}]`

testFn(testTitle, assertions.bind(null, variation))
// Weird workaround to avoid running too many tests in parallel on
// Windows, which causes problems in the CI.
const isSerial = variationNames.length >= 3 && platform === 'win32'
const testFunction = isSerial ? testFn.serial : testFn

testFunction(testTitle, assertions.bind(null, variation))
})
}

Expand Down

1 comment on commit e38f0a0

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱ Benchmark results

largeDepsEsbuild: 12.6s

largeDepsZisi: 1m 7.7s

Please sign in to comment.