Skip to content

Commit

Permalink
test: change test command to jest
Browse files Browse the repository at this point in the history
  • Loading branch information
翰文 committed May 14, 2017
1 parent 27a582d commit 01debf1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
19 changes: 16 additions & 3 deletions package.json
Expand Up @@ -33,16 +33,17 @@
"compile": "rc-tools run compile --babel-runtime",
"pub": "rc-tools run pub --babel-runtime",
"lint": "rc-tools run lint",
"test": "rc-tools run test",
"coverage": "rc-tools run coverage"
"test": "jest",
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls"
},
"devDependencies": {
"co-busboy": "^1.3.0",
"coveralls": "^2.13.1",
"expect.js": "0.3.x",
"jest": "^20.0.1",
"pre-commit": "1.x",
"rc-tools": "6.x",
"react": "15.x",
"react-addons-test-utils": "15.x",
"react-dom": "15.x",
"sinon": "2.0.0-pre.2"
},
Expand All @@ -54,5 +55,17 @@
"classnames": "^2.2.5",
"warning": "2.x",
"prop-types": "^15.5.7"
},
"jest": {
"collectCoverageFrom": [
"src/*"
],
"coveragePathIgnorePatterns": [
"src/IframeUploader.jsx"
],
"transform": {
"\\.tsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js",
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js"
}
}
}
3 changes: 1 addition & 2 deletions tests/request.spec.js
Expand Up @@ -43,8 +43,7 @@ describe('request', () => {
requests[0].respond(200, {}, '{"success": true}');
});

it.skip('40x code should be error', function callback(done) {
this.timeout(200000);
it('40x code should be error', done => {
option.onError = e => {
expect(e.toString()).to.contain('404');
done();
Expand Down
2 changes: 1 addition & 1 deletion tests/uploader.spec.js
Expand Up @@ -3,7 +3,7 @@ import expect from 'expect.js';
import Uploader from '../index';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import TestUtils from 'react-dom/test-utils';
const { Simulate } = TestUtils;
import sinon from 'sinon';

Expand Down

0 comments on commit 01debf1

Please sign in to comment.