Skip to content

Commit

Permalink
added benchmark test command
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Dec 15, 2021
1 parent 5c59bef commit 7f34c45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ install:
- npm ci
script:
- npm run lint
- npm run benchmark
- npm run test
- npm run build
- npm run build-demo
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"lint": "eslint 'src/**/*.js' 'demo/src/**/*.js' 'examples/*.js' 'webpack.*.js'",
"doc": "yuidoc --config yuidoc.json --project-version $npm_package_version",
"doc-watch": "nodemon --delay 3 --watch 'matter-doc-theme' --watch src -e 'js,html,css,handlebars' --exec 'npm run doc'",
"benchmark": "EXAMPLES=stress3 npm run test-node",
"test": "npm run test-node",
"test-all": "jest --no-cache",
"test-save": "SAVE=true npm run test-node",
Expand Down
4 changes: 3 additions & 1 deletion test/Examples.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ const MatterBuild = requireUncached('../build/matter');
const { versionSatisfies } = requireUncached('../src/core/Plugin');
const Worker = require('jest-worker').default;

const specificExamples = process.env.EXAMPLES ? process.env.EXAMPLES.split(' ') : null;
const testComparison = process.env.COMPARE === 'true';
const saveComparison = process.env.SAVE === 'true';

const excludeExamples = ['svg', 'terrain'];
const excludeJitter = ['stack', 'circleStack', 'restitution', 'staticFriction', 'friction', 'newtonsCradle', 'catapult'];

const examples = Object.keys(Example).filter(key => {
const examples = (specificExamples || Object.keys(Example)).filter(key => {
const excluded = excludeExamples.includes(key);
const buildVersion = MatterBuild.version;
const exampleFor = Example[key].for;
Expand Down

0 comments on commit 7f34c45

Please sign in to comment.