Skip to content

Commit

Permalink
Add performance tests base (anuraghazra#3141)
Browse files Browse the repository at this point in the history
* Add basic bench tests

* dev
  • Loading branch information
qwerty541 authored and j4ckofalltrades committed Mar 13, 2024
1 parent db73384 commit e93828c
Show file tree
Hide file tree
Showing 7 changed files with 357 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
run: |
npm run lint
- name: Run bench tests
run: |
npm run bench
- name: Run Prettier
run: |
npm run format:check
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
*.lock
.idea/
coverage
benchmarks
vercel_token

# IDE
Expand Down
16 changes: 16 additions & 0 deletions jest.bench.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {
// Jest-bench need its own test environment to function
testEnvironment: "jest-bench/environment",
testEnvironmentOptions: {
// still Jest-bench environment will run your environment if you specify it here
testEnvironment: "jest-environment-node",
testEnvironmentOptions: {
// specify any option for your environment
},
},
// always include "default" reporter along with Jest-bench reporter
// for error reporting
reporters: ["default", "jest-bench/reporter"],
// will pick up "*.bench.js" file.
testRegex: "(\\.bench)\\.(ts|tsx|js)$",
};
Loading

0 comments on commit e93828c

Please sign in to comment.