File tree Expand file tree Collapse file tree 12 files changed +37
-17
lines changed Expand file tree Collapse file tree 12 files changed +37
-17
lines changed Original file line number Diff line number Diff line change
1
+ .haste_cache
2
+ __tests__
1
3
docs
2
4
examples
3
5
packages
6
+ setup.sh
4
7
website
5
- __tests__
6
- .haste_cache
Original file line number Diff line number Diff line change 8
8
* Fixed ` moduleNameMapper ` config option when used with paths.
9
9
* Added ` jest-util ` , general code cleanup.
10
10
* Fixed an error with Jasmine 2 and tests that ` throw 'string errors' ` .
11
+ * Fixed issues with unmocking symlinked module names.
11
12
12
13
## jest-cli 0.9.2, babel-jest 9.0.3
13
14
Original file line number Diff line number Diff line change @@ -735,3 +735,10 @@ Indicates whether each individual test should be reported during the run. All er
735
735
changes and is used by Jest for crawling for files. Disable this if you cannot
736
736
use watchman or use the ` --no-watchman ` flag.
737
737
<generated_api_end />
738
+
739
+ ## Local Development
740
+
741
+ For local development the ` setup.sh ` file is run to link all packages together.
742
+ On most platforms this will be run automatically after ` npm install ` , however if
743
+ you find that Jest does not set up the development environment correctly, this
744
+ script can also be run manually.
Original file line number Diff line number Diff line change
1
+ 9.0.3
Original file line number Diff line number Diff line change 9
9
"diff" : " ^2.1.1" ,
10
10
"graceful-fs" : " ^4.1.3" ,
11
11
"istanbul" : " ^0.4.2" ,
12
- "jest-mock" : " ^1 .0.0 " ,
13
- "jest-util" : " ^1 .0.0 " ,
12
+ "jest-mock" : " ^9 .0.3 " ,
13
+ "jest-util" : " ^9 .0.3 " ,
14
14
"jsdom" : " ^7.2.0" ,
15
15
"json-stable-stringify" : " ^1.0.0" ,
16
16
"lodash.template" : " ^3.6.2" ,
25
25
"devDependencies" : {
26
26
"babel-eslint" : " ^4.1.3" ,
27
27
"eslint" : " ^1.7.3" ,
28
- "fbjs-scripts" : " ^0.5.0"
28
+ "fbjs-scripts" : " ^0.5.0" ,
29
+ "lerna" : " ^1.1.2"
29
30
},
30
31
"bin" : {
31
32
"jest" : " ./bin/jest.js"
38
39
"url" : " https://github.com/facebook/jest"
39
40
},
40
41
"scripts" : {
42
+ "jasmine1" : " node bin/jest.js --testRunner=jasmine1" ,
41
43
"lint" : " eslint ." ,
44
+ "postinstall" : " [ \" $NODE_ENV\" != production ] && ./setup.sh" ,
42
45
"prepublish" : " npm test" ,
43
- "test" : " npm run lint && node bin/jest.js && npm run jasmine1" ,
44
- "jasmine1" : " node bin/jest.js --testRunner=jasmine1"
46
+ "test" : " npm run lint && node bin/jest.js && npm run jasmine1"
45
47
},
46
48
"jest" : {
47
49
"rootDir" : " src" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " babel-jest" ,
3
- "version" : " 9.0.4 " ,
3
+ "version" : " 9.0.3 " ,
4
4
"repository" : {
5
5
"type" : " git" ,
6
6
"url" : " https://github.com/facebook/jest.git"
9
9
"main" : " src/index.js" ,
10
10
"dependencies" : {
11
11
"babel-core" : " ^6.0.0" ,
12
- "babel-preset-jest" : " ^1 .0.1 "
12
+ "babel-preset-jest" : " ^9 .0.3 "
13
13
}
14
14
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " babel-plugin-jest-hoist" ,
3
- "version" : " 1 .0.0 " ,
3
+ "version" : " 9 .0.3 " ,
4
4
"repository" : {
5
5
"type" : " git" ,
6
6
"url" : " https://github.com/facebook/jest.git"
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " babel-preset-jest" ,
3
- "version" : " 1 .0.1 " ,
3
+ "version" : " 9 .0.3 " ,
4
4
"repository" : {
5
5
"type" : " git" ,
6
6
"url" : " https://github.com/facebook/jest.git"
7
7
},
8
8
"license" : " BSD-3-Clause" ,
9
9
"main" : " index.js" ,
10
10
"dependencies" : {
11
- "babel-plugin-jest-hoist" : " ^1 .0.0 "
11
+ "babel-plugin-jest-hoist" : " ^9 .0.3 "
12
12
}
13
13
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jest-mock" ,
3
- "version" : " 0 .0.2 " ,
3
+ "version" : " 9 .0.3 " ,
4
4
"repository" : {
5
5
"type" : " git" ,
6
6
"url" : " https://github.com/facebook/jest.git"
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jest-util" ,
3
- "version" : " 1 .0.0 " ,
3
+ "version" : " 9 .0.3 " ,
4
4
"main" : " index.js" ,
5
5
"dependencies" : {
6
6
"chalk" : " ^1.1.1" ,
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " Setting up Jest's development environment..."
4
+ node_modules/.bin/lerna bootstrap
5
+
6
+ (cd packages/jest-mock && npm link)
7
+ npm link jest-mock
8
+ (cd packages/jest-util && npm link)
9
+ npm link jest-util
Original file line number Diff line number Diff line change @@ -534,8 +534,7 @@ class Loader {
534
534
throw e ;
535
535
}
536
536
537
- const realPath = fs . realpathSync ( modulePath ) ;
538
- if ( this . _unmockList && this . _unmockList . test ( realPath ) ) {
537
+ if ( this . _unmockList && this . _unmockList . test ( modulePath ) ) {
539
538
shouldMockModuleCache [ moduleName ] = false ;
540
539
return false ;
541
540
}
@@ -544,7 +543,7 @@ class Loader {
544
543
const currentModuleID = this . _getNormalizedModuleID ( currPath ) ;
545
544
if (
546
545
currPath . includes ( constants . NODE_MODULES ) &&
547
- realPath . includes ( constants . NODE_MODULES ) &&
546
+ modulePath . includes ( constants . NODE_MODULES ) &&
548
547
(
549
548
( this . _unmockList && this . _unmockList . test ( currPath ) ) ||
550
549
explicitShouldMock [ currentModuleID ] === false ||
You can’t perform that action at this time.
0 commit comments