Add configuration for running tests with Jest
Can be run with `node_modules/.bin/jest` for now; didn't want to disturb the grunt setup. Right now one test fails with: ``` FAIL browser/ui/__tests__/ReactDOMComponent-test.js (1.423s) ● ReactDOMComponent › updateDOM › it should update styles when mutating style object - Expected: '0' toEqual: '0.5' at Spec.<anonymous> (src/browser/ui/__tests__/ReactDOMComponent-test.js:99:33) ``` which I can only assume is a jsdom problem -- no other asserts fail.
This commit is contained in:
parent
5933d97cb6
commit
2d26451821
|
@ -0,0 +1 @@
|
|||
__DEV__ = true;
|
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
var ReactTools = require('../main.js');
|
||||
|
||||
module.exports = {
|
||||
process: function(src) {
|
||||
return ReactTools.transform(src, {harmony: true});
|
||||
}
|
||||
};
|
|
@ -54,6 +54,7 @@
|
|||
"grunt-contrib-jshint": "~0.8.0",
|
||||
"gzip-js": "~0.3.2",
|
||||
"jasmine-tapreporter": "~0.2.2",
|
||||
"jest-cli": "~0.1.5",
|
||||
"lodash": "~2.4.1",
|
||||
"microtime": "~0.5.1",
|
||||
"optimist": "~0.6.0",
|
||||
|
@ -77,5 +78,13 @@
|
|||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/grunt test"
|
||||
},
|
||||
"jest": {
|
||||
"rootDir": "src",
|
||||
"scriptPreprocessor": "../jest/preprocessor.js",
|
||||
"setupEnvScriptFile": "../jest/environment.js",
|
||||
"unmockedModulePathPatterns": [
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue