Skip to content

Commit a3fba93

Browse files
committed
test: jest performance improvements + add profiling scripts
1 parent 00612d9 commit a3fba93

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"ci": "npm run ci:build && npm run ci:test && npm run ci:docs",
1313
"ci:build": "npm run clean && npm ci && npm run build && npm run lint:code",
1414
"ci:docs": "npm run clean:docs && npm ci && ( cd docs && npm ci ) && npm run build:docs",
15-
"ci:test": "TZ=Etc/UTC jest -i --ci --coverage",
15+
"ci:test": "TZ=Etc/UTC jest --runInBand -i --ci --coverage",
1616
"clean": "rm -rf build docs/build",
1717
"clean:docs": "rm -rf docs/build",
1818
"clean:examples": "scripts/clasp.sh examples clean",
@@ -65,8 +65,11 @@
6565
"secrets:sync": "scripts/github-secrets.sh sync all",
6666
"sonar:local": "npx sonar-scanner -Dsonar.branch.name=local -Dsonar.branch.target=main -Dsonar.projectVersion=''",
6767
"start:docs": "npm run build:docs && cd docs && npm start",
68-
"test": "TZ=Etc/UTC npx jest --reporters=summary --silent",
69-
"test:examples": "TZ=Etc/UTC npx jest --reporters=summary --silent --testPathPattern src/examples",
68+
"test": "TZ=Etc/UTC npx jest --runInBand --reporters=summary --silent",
69+
"test:profile-devtools": "node --inspect-brk ./node_modules/.bin/jest --runInBand",
70+
"test:profile-jest": "npx jest --runInBand --json --outputFile=test-results.json",
71+
"test:profile-nodejs": "node --prof ./node_modules/.bin/jest --runInBand && node --prof-process isolate-*.log > profile.txt",
72+
"test:examples": "TZ=Etc/UTC npx jest --runInBand --reporters=summary --silent --testPathPattern src/examples",
7073
"test:verbose": "TZ=Etc/UTC npx jest --detectOpenHandles --reporters='default' --runInBand --verbose",
7174
"update": "npm run update:examples && npm run update:parser && npm run update:schema && npm run update:docs && npm run update:contributors",
7275
"update:contributors": "npx all-contributors generate",

0 commit comments

Comments
 (0)