Skip to content

Commit

Permalink
Bust jest caching and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeux committed Aug 11, 2015
1 parent 0d636a0 commit 5ebe0ed
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
20 changes: 20 additions & 0 deletions packager/react-packager/src/Cache/__mocks__/Cache.js
Original file line number Diff line number Diff line change
@@ -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;
8 changes: 8 additions & 0 deletions packager/react-packager/src/Cache/__tests__/Cache-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion website/server/extractDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5ebe0ed

Please sign in to comment.