Bust jest caching and fix tests

This commit is contained in:
Christopher Chedeau 2015-08-11 10:25:39 -07:00
parent 0d636a017d
commit 5ebe0ed717
5 changed files with 34 additions and 6 deletions

View File

@ -11,19 +11,19 @@ before_install:
- brew update
install:
- brew reinstall xctool nvm
- rm -Rf `node -p "require('os').tmpDir()"`/jest_preprocess_cache
- npm install -g flow-bin@`node -p "require('fs').readFileSync('.flowconfig', 'utf8').split('[version]')[1].trim()"`
- mkdir -p .nvm
- cp $(brew --prefix nvm)/nvm-exec .nvm/
- export NVM_DIR=.nvm
- source $(brew --prefix nvm)/nvm.sh
- nvm install iojs-v2
- nvm use iojs-v2
- npm config set spin=false
- npm install
script:
- |
nvm use iojs-v2
if [ "$TEST_TYPE" = objc ]
then

View File

@ -47,8 +47,8 @@
},
"dependencies": {
"absolute-path": "0.0.0",
"babel": "5.4.3",
"babel-core": "5.6.4",
"babel": "5.8.21",
"babel-core": "5.8.21",
"chalk": "1.0.0",
"connect": "2.8.3",
"debug": "2.1.0",
@ -63,7 +63,7 @@
"react-timer-mixin": "^0.13.1",
"react-tools": "git://github.com/facebook/react#b4e74e38e43ac53af8acd62c78c9213be0194245",
"rebound": "^0.0.12",
"regenerator": "0.8.31",
"regenerator": "0.8.36",
"sane": "^1.1.2",
"semver": "^4.3.6",
"source-map": "0.1.31",

View File

@ -0,0 +1,20 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
class Cache {
get(filepath, field, cb) {
return cb(filepath);
}
invalidate(filepath) { }
end() { }
}
module.exports = Cache;

View File

@ -52,6 +52,14 @@ describe('JSTransformer Cache', () => {
});
pit('supports storing multiple fields', () => {
require('fs').stat.mockImpl((file, callback) => {
callback(null, {
mtime: {
getTime: () => {}
}
});
});
var cache = new Cache({
projectRoots: ['/rootDir'],
transformModulePath: 'x.js',

View File

@ -169,7 +169,7 @@ var components = [
'../Libraries/Picker/PickerIOS.ios.js',
'../Libraries/Components/ScrollView/ScrollView.js',
'../Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js',
'../Libraries/Components/SliderIOS/SliderIOS.js',
'../Libraries/Components/SliderIOS/SliderIOS.ios.js',
'../Libraries/Components/SwitchIOS/SwitchIOS.ios.js',
'../Libraries/Components/TabBarIOS/TabBarIOS.ios.js',
'../Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js',