Skip to content

Commit 452cac0

Browse files
committed
Fix tests and rewrite to jest
1 parent 505fcc9 commit 452cac0

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

.eslintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"env": {
1010
"browser": true,
11-
"mocha": true,
11+
"jest": true,
1212
"node": true
1313
},
1414
"rules": {

package.json

+4-10
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@
99
"build:umd": "rimraf ./umd && webpack --progress --config webpack.config.umd.js",
1010
"build:umd:min": "webpack --env.minimize --progress --config webpack.config.umd.js",
1111
"lint": "eslint --max-warnings=0 src test examples/src",
12-
"test":
13-
"npm run lint && NODE_ENV=test mocha --compilers js:babel-core/register --recursive",
14-
"test:watch":
15-
"NODE_ENV=test mocha --compilers js:babel-core/register --recursive --watch",
16-
"test:cov":
17-
"babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive",
12+
"test": "jest",
1813
"prepare": "npm run build",
19-
"prepublishOnly": "npm run test && npm run clean && npm run build && npm run build:umd && npm run build:umd:min",
14+
"prepublishOnly":
15+
"npm run lint && npm run test && npm run clean && npm run build && npm run build:umd && npm run build:umd:min",
2016
"start": "cd examples && npm start",
2117
"precommit": "lint-staged"
2218
},
@@ -64,11 +60,9 @@
6460
"eslint-plugin-promise": "^3.6.0",
6561
"eslint-plugin-react": "7.4.0",
6662
"eslint-plugin-standard": "^3.0.1",
67-
"expect": "^21.2.1",
6863
"husky": "^0.14.3",
69-
"isparta": "^4.0.0",
64+
"jest": "^23.6.0",
7065
"lint-staged": "^4.3.0",
71-
"mocha": "^4.0.1",
7266
"prettier": "^1.7.4",
7367
"react": "^16.0.0",
7468
"react-dom": "^16.0.0",

test/index.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import expect from 'expect';
32
import { createRenderer } from 'react-test-renderer/shallow';
43

54
import JSONTree from '../src/index';

test/objType.spec.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import expect from 'expect';
2-
31
import objType from '../src/objType';
42

53
describe('objType', () => {

0 commit comments

Comments
 (0)