Skip to content

Commit 24c0045

Browse files
refactor(benchmark): move benchmark from test to its own directory
And update precommit hook to run test
1 parent c482c33 commit 24c0045

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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 <mark@remarkablemark.org>",
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)