Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jest to lookup #684

Closed
targos opened this issue Mar 7, 2019 · 28 comments · Fixed by #728
Closed

Add Jest to lookup #684

targos opened this issue Mar 7, 2019 · 28 comments · Fixed by #728

Comments

@targos
Copy link
Member

targos commented Mar 7, 2019

Jest is a very popular testing framework (> 4.4M downloads). Node.js releases have broken it more than once, latest being 11.11.0: nodejs/node#25963 (comment).

Support for Yarn was a necessary step to add Jest but unfortunately it is not enough.
Here is the (truncated) output I get with the latest version of CITGM:

$ citgm jest --yarn
info:    starting            | jest                
info:    lookup              | jest                
info:    lookup-notfound     | jest                
info:    lookup-githead      | https://github.com/facebook/jest/archive/b16789230fd45056a7f2fa199bae06c7a1780deb.tar.gz
info:    jest npm:           | Downloading project: https://github.com/facebook/jest/archive/b16789230fd45056a7f2fa199bae06c7a1780deb.tar.gz
info:    jest npm:           | Project downloaded -.tgz
info:    jest yarn:          | yarn install started
info:    jest yarn:          | yarn install successfully completed
info:    jest yarn:          | test suite started  
error:   failure             | The canary is dead: 
error:   failing module(s)   |                     
error:   module name:        | jest                
error:   version:            | 24.1.0              
error:   error:              | The canary is dead: 
error:   error:              | undefinedyarn install v1.13.0                                                                                                                         
error:                       | [1/5] Validating package.json...                                                                                                                      
error:                       | [2/5] Resolving packages...                                                                                                                           
error:                       | [3/5] Fetching packages...                                                                                                                            
error:                       | info fsevents@1.2.7: The platform "linux" is incompatible with this module.                                                                           
error:                       | info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.                                       
error:                       | [4/5] Linking dependencies...                                                                                                                         
error:                       | [5/5] Building fresh packages...                                                                                                                      
error:                       | $ opencollective postinstall && yarn build                                                                                                            
error:                       |                                                                                                                                                       
error:                       | *** Thank you for using jest! ***                                                                                                                     
error:                       |                                                                                                                                                       
error:                       | Please consider donating to our open collective                                                                                                       
error:                       | to help us maintain this package.                                                                                                                     
error:                       |                                                                                                                                                       
error:                       | https://opencollective.com/jest/donate                                                                                                                
error:                       |                                                                                                                                                       
error:                       | ***                                                                                                                                                   
error:                       |                                                                                                                                                       
error:                       | yarn run v1.13.0                                                                                                                                      
error:                       | $ node ./scripts/build.js                                                                                                                             
error:                       | Building packages                                                                                                                                     
error:                       | babel-jest................................................................ DONE                                                                       
error:                       | babel-plugin-jest-hoist................................................... DONE                                                                       
error:                       | babel-preset-jest......................................................... DONE                                                                       
error:                       | diff-sequences............................................................ DONE                                                                       
error:                       | eslint-config-fb-strict................................................... DONE                                                                       
error:                       | expect.................................................................... DONE                                                                       
error:                       | jest...................................................................... DONE                                                                       
error:                       | jest-changed-files........................................................ DONE                                                                       
error:                       | jest-circus............................................................... DONE                                                                       
error:                       | jest-cli.................................................................. DONE                                                                       
error:                       | jest-config............................................................... DONE                                                                       
error:                       | jest-diff................................................................. DONE                                                                       
error:                       | jest-docblock............................................................. DONE                                                                       
error:                       | jest-each................................................................. DONE                                                                       
error:                       | jest-environment-jsdom.................................................... DONE                                                                       
error:                       | jest-environment-node..................................................... DONE                                                                       
error:                       | jest-get-type............................................................. DONE                                                                       
error:                       | jest-haste-map............................................................ DONE                                                                       
error:                       | jest-jasmine2............................................................. DONE                                                                       
error:                       | jest-leak-detector........................................................ DONE                                                                       
error:                       | jest-matcher-utils........................................................ DONE                                                                       
error:                       | jest-message-util......................................................... DONE                                                                       
error:                       | jest-mock................................................................. DONE                                                                       
error:                       | jest-phabricator.......................................................... DONE                                                                       
error:                       | jest-regex-util........................................................... DONE                                                                       
error:                       | jest-repl................................................................. DONE                                                                       
error:                       | jest-resolve.............................................................. DONE                                                                       
error:                       | jest-resolve-dependencies................................................. DONE                                                                       
error:                       | jest-runner............................................................... DONE                                                                       
error:                       | jest-runtime.............................................................. DONE                                                                       
error:                       | jest-serializer........................................................... DONE                                                                       
error:                       | jest-snapshot............................................................. DONE                                                                       
error:                       | jest-util................................................................. DONE                                                                       
error:                       | jest-validate............................................................. DONE                                                                       
error:                       | jest-watcher.............................................................. DONE                                                                       
error:                       | jest-worker............................................................... DONE                                                                       
error:                       | pretty-format............................................................. DONE                                                                       
error:                       |                                                                                                                                                       
error:                       | Building browser packages                                                                                                                             
error:                       | jest-mock................................................................. DONE                                                                       
error:                       | pretty-format............................................................. DONE                                                                       
error:                       | expect.................................................................... DONE                                                                       
error:                       | Done in 11.11s.                                                                                                                                       
error:                       | Done in 28.16s.                                                                                                                                       
error:                       | yarn run v1.13.0                                                                                                                                      
error:                       | $ yarn typecheck && yarn lint && yarn jest                                                                                                            
error:                       | $ flow check --include-warnings                                                                                                                       
error:                       | Found 0 errors                                                                                                                                        
error:                       | $ eslint . --cache --report-unused-disable-directives --ext js,md                                                                                     
error:                       | $ node ./packages/jest-cli/bin/jest.js                                                                                                                
error:                       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.                                                                  
error:                       | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.                                                                  
error:                       |                                                                                                                                                       
error:                       | FAIL packages/jest-diff/src/__tests__/diff.test.js                                                                                                    
error:                       | ● oneline strings                                                                                                                                     
error:                       |                                                                                                                                                       
error:                       | expect(value).toMatchSnapshot()                                                                                                                       
error:                       |                                                                                                                                                       
error:                       | Received value does not match stored snapshot "oneline strings 1".                                                                                    
error:                       |                                                                                                                                                       
error:                       | - Snapshot                                                                                                                                            
error:                       | + Received                                                                                                                                            
error:                       |                                                                                                                                                       
error:                       | - "<green>- Expected</>                                                                                                                               
error:                       | - <red>+ Received</>                                                                                                                                  
error:                       | + "- Expected                                                                                                                                         
error:                       | + + Received                                                                                                                                          
error:                       |                                                                                                                                                       
error:                       | - <green>- ab</>                                                                                                                                      
error:                       | - <red>+ aa</>"                                                                                                                                       
error:                       | + - ab                                                                                                                                                
error:                       | + + aa"                                                                                                                                               
error:                       |                                                                                                                                                       
error:                       | at Object.toMatchSnapshot (packages/jest-diff/src/__tests__/diff.test.js:88:28)                                                                       
error:                       |                                                                                                                                                       
error:                       | ● oneline strings                                                                                                                                     
error:                       |                                                                                                                                                       
error:                       | expect(value).toMatchSnapshot()                                                                                                                       
error:                       |                                                                                                                                                       
error:                       | Received value does not match stored snapshot "oneline strings 2".                                                                                    
error:                       |                                                                                                                                                       
error:                       | - Snapshot                                                                                                                                            
error:                       | + Received                                                                                                                                            
error:                       |                                                                                                                                                       
error:                       | - "<green>- Expected</>                                                                                                                               
error:                       | - <red>+ Received</>                                                                                                                                  
error:                       | + "- Expected                                                                                                                                         
error:                       | + + Received                                                                                                                                          
error:                       |                                                                                                                                                       
error:                       | - <green>- 123456789</>                                                                                                                               
error:                       | - <red>+ 234567890</>"                                                                                                                                
error:                       | + - 123456789                                                                                                                                         
error:                       | + + 234567890"                                                                                                                                        
error:                       |                                                                                                                                                       
error:                       | at Object.toMatchSnapshot (packages/jest-diff/src/__tests__/diff.test.js:89:42)
...

There's obviously something wrong with colors.

/cc @SimenB

@SimenB
Copy link
Member

SimenB commented Mar 7, 2019

Thanks for opening up this issue! Yeah, something is wrong with colors. I tried a FORCE_COLOR=1 in #560 (comment), but that was too much (I can't remember the details). I'll try to find the time either today or this weekend to look into it

@BridgeAR
Copy link
Member

BridgeAR commented Mar 7, 2019

@SimenB there are two open PRs in Node.js that might improve the situation for Jest (I did not check what issue it is really about):

nodejs/node#26261
nodejs/node#26485

Update: Thinking about it again, it will likely not have any impact.

@SimenB
Copy link
Member

SimenB commented Mar 7, 2019

Oh, cool!

I think the issue is with how citgm spawns the subprocesses - it does not handle colors correctly. IIRC setting FORCE_COLOR made everything colorized, even things that shouldn't be. But that's just a shot in the dark, I haven't investigated

@BridgeAR
Copy link
Member

BridgeAR commented Mar 7, 2019

FORCE_COLOR is indeed going to activate colors on everything, so this won't help.

Can you point me to the code in JEST that adds the coloring? I am just trying to wrap my head around what's really going on.

@SimenB
Copy link
Member

SimenB commented Mar 7, 2019

We do it in a bunch of places - just grep for chalk.

The test failure in the snippet above is since this serializer does not find any ansi escapes: https://github.com/facebook/jest/blob/b63b279ca832613d2685611d3f98ee175250e9ac/packages/pretty-format/src/plugins/ConvertAnsi.ts
Code adding these specific colors: https://github.com/facebook/jest/blob/b63b279ca832613d2685611d3f98ee175250e9ac/packages/jest-diff/src/diffStrings.ts

@BridgeAR
Copy link
Member

BridgeAR commented Mar 7, 2019

The most likely reason I see that the colors are not returned are that the output stream used by CITGM on our CI is that it's not a tty. Chalk is going to check if colors or supported and one of those checks is if it's a tty or not. When using FORCE_COLOR it will apply to all output streams. So even for streams that are indeed not meant to output colors.

@targos
Copy link
Member Author

targos commented Mar 7, 2019

Can we simulate/pretend to be a tty stream from citgm?

@BridgeAR
Copy link
Member

BridgeAR commented Mar 7, 2019

@targos that might be possible.

@BridgeAR
Copy link
Member

@SimenB what about adding a few libraries that use jest as testing framework? That way we would at least have noticed the recent issue that broke jest and we would probably detect other similar things as well.

@SimenB
Copy link
Member

SimenB commented Mar 12, 2019

That works for me! E.g. React #625

@BridgeAR
Copy link
Member

@SimenB that sadly fails on Node.js master. It would have to be something that succeeds with master.

@SimenB
Copy link
Member

SimenB commented Mar 13, 2019

Ah, ok. We can do https://github.com/jest-community/eslint-plugin-jest? And remove it whenever a more fitting project using Jest (or Jest itself) is added to the lookup?

@BridgeAR
Copy link
Member

@SimenB if it passes the tests with Node.js master, that should be fine. Would you be so kind and open a PR?

@SimenB
Copy link
Member

SimenB commented Mar 13, 2019

Yup it passes (at least 12.0.0-nightly20190313e6fa50e953), with a YARN_IGNORE_ENGINES=true env variable

@SimenB
Copy link
Member

SimenB commented Mar 13, 2019

@BridgeAR #686

targos pushed a commit that referenced this issue Mar 17, 2019
This is mostly to have a code base using Jest. It would be preferable to
include Jest itself instead. See #684.
MylesBorins pushed a commit that referenced this issue Mar 21, 2019
This is mostly to have a code base using Jest. It would be preferable to
include Jest itself instead. See #684.
@scotthovestadt
Copy link

@targos See jestjs/jest#8270 for how I solved a similar issue with Travis CI.

@SimenB
Copy link
Member

SimenB commented Apr 4, 2019

I'm working on it 🙂 Main thing I need to do is allow another script than test. Will report back tomorrow

@targos
Copy link
Member Author

targos commented Apr 4, 2019

I tried to run CITGM on jest's master branch but linting fails:

error:                       | /tmp/8c92a0ba-1dd5-449d-b3a8-086b2bb99e79/jest/packages/jest-worker/src/workers/NodeThreadsWorker.ts
error:                       | 11:1  error  Unused eslint-disable directive (no problems were reported from 'import/no-unresolved')
error:                       |
error:                       | /tmp/8c92a0ba-1dd5-449d-b3a8-086b2bb99e79/jest/packages/jest-worker/src/workers/threadChild.ts
error:                       | 9:1  error  Unused eslint-disable directive (no problems were reported from 'import/no-unresolved')
error:                       |

@scotthovestadt
Copy link

scotthovestadt commented Apr 4, 2019

@targos I'm planning on resolving that lint error today. We're currently not failing on "warnings" so it got through CI. (Feel free to submit a PR fixing it if you feel like it!)

EDIT: Those are actually different lint errors than what I was talking about, but I'll take a look at those too. I've seen them happen locally but don't think they happen on CI, will need to investigate why

@SimenB
Copy link
Member

SimenB commented Apr 4, 2019

Currently, lint will fail on a mac since it successfully installs fsevents.

This is why I talked about using another script from test - we don't need lint or test coverage. I'd like to run test-ci-partial or whatever it's called, which is just tests :)

@targos
Copy link
Member Author

targos commented Apr 4, 2019

Currently, lint will fail on a mac since it successfully installs fsevents.

I'm on Linux, though.

@SimenB
Copy link
Member

SimenB commented Apr 4, 2019

Scott said something like it in chat as well, so I might very well have misunderstood the issue...

I'd still like to skip coverage and lint though, they shouldn't be necessary for citgm 🙂

@SimenB
Copy link
Member

SimenB commented Apr 5, 2019

I tested it out on top of #696 now, and we're really close!

We have 3 issues

  1. Since CITGM downloads a release, and not master, the fix from Fix Travis CI colors in snapshots by always forcing color on when in CI. jestjs/jest#8270 is not included. I hardcoded --color into citgm to test though, and it works. So as soon as Jest makes a release, the colors should work
  2. CI does not have Mercurial installed, so our tests for the mercurial integration fails. Who can we ask to install hg into CI?
  3. I get a bunch of ENAMETOOLONG errors. Not sure how to deal with those

This is what I have in lookup.json:

"jest": {
  "prefix": "v",
  "maintainers": ["cpojer", "scotthovestadt", "SimenB", "thymikee"],
  "yarn": true,
  "scripts": ["test-ci-partial"],
  "envVar": { "YARN_IGNORE_ENGINES": true },
  "skip": ["aix"],
  "timeoutLength": 1800000
},

Hack for colors:

diff --git i/lib/package-manager/test.js w/lib/package-manager/test.js
index ba89636..d383705 100644
--- i/lib/package-manager/test.js
+++ w/lib/package-manager/test.js
@@ -69,7 +69,7 @@ function test(packageManager, context, next) {
     const scripts = context.options.customTest
       ? [[context.options.customTest]]
       : (context.module.scripts ? context.module.scripts : ['test']).map(
-          (x) => [packageManagerBin, 'run', x]
+          (x) => [packageManagerBin, 'run', x, '--color']
         );
     context.emit(
       'data',

Full run included below

$ node bin/citgm.js jest
info:    starting            | jest
info:    lookup              | jest
info:    lookup-found        | jest
info:    jest lookup-replace | https://github.com/facebook/jest/archive/0efb1d7809cb96ae87a7601e7802f1dab3774280.tar.gz
info:    jest npm:           | Downloading project: https://github.com/facebook/jest/archive/0efb1d7809cb96ae87a7601e7802f1dab3774280.tar.gz
info:    jest npm:           | Project downloaded -.tgz
info:    jest yarn:          | yarn install started
info:    jest yarn:          | yarn install successfully completed
info:    jest yarn:          | test suite started
error:   jest npm:           | npm-test Timed Out
error:   failure             | Test Timed Out
warn:    flaky module(s)     |
warn:    module name:        | jest
warn:    version:            | 24.7.1
warn:    error:              | Test Timed Out
warn:    error:              | undefinedyarn install v1.15.0
warn:                        | [1/4] Resolving packages...
warn:                        | [2/4] Fetching packages...
warn:                        | [3/4] Linking dependencies...
warn:                        | [4/4] Building fresh packages...
warn:                        | $ opencollective postinstall && yarn build
warn:                        |
warn:                        | *** Thank you for using jest! ***
warn:                        |
warn:                        | Please consider donating to our open collective
warn:                        | to help us maintain this package.
warn:                        |
warn:                        | https://opencollective.com/jest/donate
warn:                        |
warn:                        | ***
warn:                        |
warn:                        | yarn run v1.15.0
warn:                        | $ yarn build:ts
warn:                        | $ node scripts/buildTs.js
warn:                        | Building TypeScript definition files
warn:                        | Building.................................................................. DONE
warn:                        | $ node ./scripts/build.js
warn:                        | Building packages
warn:                        | babel-jest................................................................ DONE
warn:                        | babel-plugin-jest-hoist................................................... DONE
warn:                        | babel-preset-jest......................................................... DONE
warn:                        | diff-sequences............................................................ DONE
warn:                        | eslint-config-fb-strict................................................... DONE
warn:                        | expect.................................................................... DONE
warn:                        | jest...................................................................... DONE
warn:                        | jest-changed-files........................................................ DONE
warn:                        | jest-circus............................................................... DONE
warn:                        | jest-cli.................................................................. DONE
warn:                        | jest-config............................................................... DONE
warn:                        | jest-console.............................................................. DONE
warn:                        | jest-core................................................................. DONE
warn:                        | jest-diff................................................................. DONE
warn:                        | jest-docblock............................................................. DONE
warn:                        | jest-each................................................................. DONE
warn:                        | jest-environment.......................................................... DONE
warn:                        | jest-environment-jsdom.................................................... DONE
warn:                        | jest-environment-node..................................................... DONE
warn:                        | jest-fake-timers.......................................................... DONE
warn:                        | jest-get-type............................................................. DONE
warn:                        | jest-haste-map............................................................ DONE
warn:                        | jest-jasmine2............................................................. DONE
warn:                        | jest-leak-detector........................................................ DONE
warn:                        | jest-matcher-utils........................................................ DONE
warn:                        | jest-message-util......................................................... DONE
warn:                        | jest-mock................................................................. DONE
warn:                        | jest-phabricator.......................................................... DONE
warn:                        | jest-regex-util........................................................... DONE
warn:                        | jest-repl................................................................. DONE
warn:                        | jest-reporters............................................................ DONE
warn:                        | jest-resolve.............................................................. DONE
warn:                        | jest-resolve-dependencies................................................. DONE
warn:                        | jest-runner............................................................... DONE
warn:                        | jest-runtime.............................................................. DONE
warn:                        | jest-serializer........................................................... DONE
warn:                        | jest-snapshot............................................................. DONE
warn:                        | jest-source-map........................................................... DONE
warn:                        | jest-test-result.......................................................... DONE
warn:                        | jest-test-sequencer....................................................... DONE
warn:                        | jest-transform............................................................ DONE
warn:                        | jest-types................................................................ DONE
warn:                        | jest-util................................................................. DONE
warn:                        | jest-validate............................................................. DONE
warn:                        | jest-watcher.............................................................. DONE
warn:                        | jest-worker............................................................... DONE
warn:                        | pretty-format............................................................. DONE
warn:                        | test-utils................................................................ DONE
warn:                        |
warn:                        | Building browser packages
warn:                        | jest-mock................................................................. DONE
warn:                        | pretty-format............................................................. DONE
warn:                        | expect.................................................................... DONE
warn:                        | Done in 210.63s.
warn:                        | Done in 231.80s.
yarn run v1.15.0
$ yarn jest -i --config jest.config.ci.js --color
$ node ./packages/jest-cli/bin/jest.js -i --config jest.config.ci.js --color
warn:                        |
warn:                        | ........(node:42320) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
warn:                        | ..............
warn:                        |   ● gets changed files for hg
warn:                        |
warn:                        | Command failed: hg status -amnu --rev min((!public() & ::.)+.)^ /var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest-changed-files-test-dir /var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest-changed-files-test-dir/nested-dir /var/folders/gj/0mygp
warn:                        | abort: empty revision range
warn:                        |
warn:                        |       at makeError (node_modules/execa/index.js:174:9)
warn:                        |
warn:                        | .....
warn:                        |   ● gets changed files for hg
warn:                        |
warn:                        | expect(received).toMatch(expected)
warn:                        |
warn:                        | Expected pattern: /PASS __tests__(\/|\\)file2.test.js/
warn:                        | Received string:  "
warn:                        |
warn:                        |   ● Test suite failed to run
warn:                        |
warn:                        |     abort: empty revision range
warn:                        |
warn:                        | "
warn:                        |
warn:                        |       299 |
warn:                        |       300 |   ({stdout, stderr} = runJest(DIR, ['-o', '--changedFilesWithAncestor']));
warn:                        |     > 301 |   expect(stderr).toMatch(/PASS __tests__(\/|\\)file2.test.js/);
warn:                        |           |                  ^
warn:                        |       302 |   expect(stderr).toMatch(/PASS __tests__(\/|\\)file3.test.js/);
warn:                        |       303 | });
warn:                        |       304 |
warn:                        |
warn:                        |       at Object.toMatch (e2e/__tests__/onlyChanged.test.ts:301:18)
warn:                        |       at asyncGeneratorStep (e2e/__tests__/onlyChanged.test.ts:13:103)
warn:                        |       at _next (e2e/__tests__/onlyChanged.test.ts:15:194)
warn:                        |       at e2e/__tests__/onlyChanged.test.ts:15:364
warn:                        |       at Object.<anonymous> (e2e/__tests__/onlyChanged.test.ts:15:97)
warn:                        |
warn:                        | ........
warn:                        |   ● mocks modules by default when using automocking
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● doesn't mock modules when explicitly unmocked when using automocking
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● doesn't mock modules when explicitly unmocked via a different name
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● doesn't mock modules when disableAutomock() has been called
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● uses manual mock when automocking on and mock is available
warn:    error:              | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● does not use manual mock when automocking is off and a real module is available
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● resolves mapped module names and unmocks them by default
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● automocking is disabled by default
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● unmocks modules in config.unmockedModulePathPatterns for tests with automock enabled when automock is false
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● resetModules › resets all the modules
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● isolateModules › resets all modules after the block
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● isolateModules › cannot nest isolateModules blocks
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● isolateModules › can call resetModules within a isolateModules block
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        | ..........................
warn:                        |   ● transitive dependencies › mocks a manually mocked and mapped module
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● transitive dependencies › unmocks transitive dependencies in node_modules by default
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● transitive dependencies › unmocks transitive dependencies in node_modules when using unmock
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● transitive dependencies › unmocks transitive dependencies in node_modules by default when using both patterns and unmock
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● transitive dependencies › mocks deep dependencies when using unmock
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        |   ● transitive dependencies › does not mock deep dependencies when using deepUnmock
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:196:21)
warn:                        |
warn:                        | ...................................................
warn:                        |   ● Runtime › genMockFromModule › does not cause side effects in the rest of the module system when generating a mock
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        |   ● Runtime › genMockFromModule › resolves mapped modules correctly
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:    error:              |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        |   ● Runtime › creates mock objects in the right environment
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        | ...............
warn:                        |   ● Runtime › uses configured moduleDirectories
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        |   ● Runtime › resolves packages
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        |   ● Runtime › finds closest module from moduleDirectories
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        |   ● Runtime › only checks the configured directories
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        | .............................................
warn:                        |   ● Runtime › internalModule › loads modules and applies transforms
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        |   ● Runtime › internalModule › loads internal modules without applying transforms
warn:                        |
warn:                        | ENAMETOOLONG: name too long, open '/private/var/folders/gj/0mygpdfn6598xh34njlyrqzc0000gn/T/jest_dx/haste-map-Runtime--private-var-folders-gj-0mygpdfn6598xh34njlyrqzc0000gn-T-d356e5c6-aa8b-4ce8-9629-3d8f22d0ed89-jest-packages-jest-runtime-src-__tests
warn:                        |
warn:                        |       at Object.writeFileSync (packages/jest-serializer/build/index.js:197:21)
warn:                        |
warn:                        | ................................
info:    done                | The smoke test has passed.
info:    duration            | test duration: 881708ms

@richardlau
Copy link
Member

richardlau commented Apr 5, 2019

From the full run details the test also timed out:

error:   jest npm:           | npm-test Timed Out
error:   failure             | Test Timed Out
...
info:    done                | The smoke test has passed.
info:    duration            | test duration: 881708ms

The default timeout to run an install/test script is 10 minutes:

citgm/lib/timeout.js

Lines 3 to 4 in 0112720

// Default timeout to 10 minutes if not provided
const kDefaultTimeout = 1000 * 60 * 10;

@SimenB
Copy link
Member

SimenB commented Apr 5, 2019

Yeah, I added "timeoutLength": 1800000 afterwards

@richardlau
Copy link
Member

Yeah, I added "timeoutLength": 1800000 afterwards

I don't think that's going to do anything:

const delay = context.options.timeoutLength || kDefaultTimeout;

context.options.timeoutLength is the value passed in on the command line (--timeout).

@SimenB
Copy link
Member

SimenB commented Apr 5, 2019

Ahhhh. TIL 😀

@SimenB SimenB mentioned this issue May 10, 2019
4 tasks
@SimenB
Copy link
Member

SimenB commented May 10, 2019

Maybe now? 😀 #728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants