Skip to content

Commit bfe2023

Browse files
Merge pull request #75 from remarkablemark/refactor-benchmark
Refactor benchmark
2 parents c482c33 + aa30334 commit bfe2023

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ script:
77
- npm run lint
88
- npm run cover
99
- npm run build
10+
- npm run benchmark
1011
after_script:
1112
- npm run coveralls
1213
cache:

test/benchmark.js renamed to benchmark/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const Benchmark = require('benchmark');
2-
const { data } = require('./helpers/');
3-
const Parser = require('../');
2+
const { data } = require('../test/helpers/');
3+
const Parser = require('..');
44

55
const suite = new Benchmark.Suite();
66

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"author": "Mark <[email protected]>",
66
"main": "index.js",
77
"scripts": {
8+
"benchmark": "node benchmark",
89
"build": "npm run clean && npm run build:min && npm run build:unmin",
910
"build:min": "NODE_ENV=production webpack -o dist/html-react-parser.min.js",
1011
"build:unmin": "NODE_ENV=development webpack -o dist/html-react-parser.js",
@@ -14,11 +15,10 @@
1415
"coveralls": "cat coverage/lcov.info | coveralls",
1516
"lint": "eslint --ignore-path .gitignore .",
1617
"lint:fix": "npm run lint -- --fix",
17-
"precommit": "lint-staged",
18+
"precommit": "npm test && lint-staged",
1819
"prepublishOnly": "npm run build",
1920
"release": "standard-version --no-verify",
20-
"test": "mocha",
21-
"test:benchmark": "node test/benchmark.js"
21+
"test": "mocha"
2222
},
2323
"repository": {
2424
"type": "git",

0 commit comments

Comments
 (0)