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

chore(jest): remove examples before running tests #868

Merged
merged 4 commits into from
Jun 29, 2021
Merged

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jun 14, 2021

See #867 (comment)

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • contribution guidelines followed
    here

lib/lookup.json Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2021

Codecov Report

Merging #868 (8eca3fb) into main (58d5239) will increase coverage by 1.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #868      +/-   ##
==========================================
+ Coverage   95.26%   96.30%   +1.04%     
==========================================
  Files          28       28              
  Lines        2112     2112              
==========================================
+ Hits         2012     2034      +22     
+ Misses        100       78      -22     
Impacted Files Coverage Δ
lib/match-conditions.js 92.00% <0.00%> (-2.00%) ⬇️
lib/bin/citgm-all.js 95.37% <0.00%> (+0.84%) ⬆️
lib/bin/citgm.js 100.00% <0.00%> (+1.80%) ⬆️
lib/spawn.js 100.00% <0.00%> (+76.92%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58d5239...8eca3fb. Read the comment docs.

@targos
Copy link
Member

targos commented Jun 14, 2021

@targos
Copy link
Member

targos commented Jun 14, 2021

This introduces another error:

15:33:08 error:                     | �[31mError: Can't find a root directory while resolving a config file path.�[39m                                                                                                                                                              
15:33:08 error:                     | �[31mProvided path to resolve: /home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/examples/*�[39m                                                                                                                             
15:33:08 error:                     | �[31mcwd: /home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest�[39m                                                                                                                                                             
15:33:08 error:                     | �[31m    at _default (/home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/packages/jest-config/build/resolveConfigPath.js:106:11)�[39m                                                                                         
15:33:08 error:                     | �[31m    at readConfig (/home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/packages/jest-config/build/index.js:223:49)�[39m                                                                                                   
15:33:08 error:                     | �[31m    at /home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/packages/jest-config/build/index.js:454:18�[39m                                                                                                                
15:33:08 error:                     | �[31m    at Array.map (<anonymous>)�[39m                                                                                                                                                                                                      
15:33:08 error:                     | �[31m    at readConfigs (/home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/packages/jest-config/build/index.js:448:10)�[39m                                                                                                  
15:33:08 error:                     | �[31m    at async runCLI (/home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/packages/jest-core/build/cli/index.js:220:59)�[39m                                                                                               
15:33:08 error:                     | �[31m    at async Object.run (/home/iojs/tmp/citgm_tmp/8843d9b7-75d1-4c8b-92ff-b4fe91cfc8a6/jest/packages/jest-cli/build/cli/index.js:163:37)�[39m    

@SimenB
Copy link
Member Author

SimenB commented Jun 14, 2021

@targos hah, I should have tested it 😅 Pushed a new commit which works locally 👍

@targos
Copy link
Member

targos commented Jun 14, 2021

@targos
Copy link
Member

targos commented Jun 14, 2021

There are errors related to "duplicate manual mocks": https://ci.nodejs.org/job/citgm-smoker-nobuild/1093/nodes=fedora-last-latest-x64/console

@SimenB
Copy link
Member Author

SimenB commented Jun 14, 2021

those are just warnings, shouldn't affect the test run. Or does CITGM fail if there is output to stderr?

@targos
Copy link
Member

targos commented Jun 14, 2021

does CITGM fail if there is output to stderr

No, CITGM fails if the command returned a non-zero exit code.

@targos
Copy link
Member

targos commented Jun 14, 2021

@SimenB
Copy link
Member Author

SimenB commented Jun 14, 2021

I don't see any test failures in that log, tho... I assume The canary is dead just means it failed and not a timeout?

it hides output
@targos
Copy link
Member

targos commented Jun 15, 2021

With the last commit: Usage Error: Couldn't find a script named "jest --color -i"

@targos
Copy link
Member

targos commented Jun 15, 2021

I tried with the previous commit on my mac and it fails with a bunch of errors like this:

error:                     |   ● transitive dependencies › does not mock deep dependencies when using deepUnmock
error:                     |
error:                     | ENAMETOOLONG: name too long, open '/private/var/folders/vy/7hd71t752szdg3km0llpsqdw0000gn/T/17b00a38-fb3b-4431-b5
error:                     |
error:                     |       at Object.writeFileSync (packages/jest-serializer/build/index.js:100:15)
error:                     |
error:                     | ...........................

Edit: I forgot that we skip on darwin. Maybe that was the reason...

@targos
Copy link
Member

targos commented Jun 15, 2021

I can reproduce the failure on Linux.

@targos
Copy link
Member

targos commented Jun 15, 2021

I don't know if it's why it fails on our CI, but locally I have quite a lot of errors. I did:

wget https://github.com/facebook/jest/archive/HEAD.tar.gz
tar xf HEAD.tar.gz
cd jest-91b94c812834753adced4f1a8be0e6fc8937bb1f
yarn
yarn remove-examples
yarn build:js
export CI=true
yarn test-ci-partial

Output: https://gist.github.com/targos/d4bffbe8b51a7b2af5eb6b6200580f1f

@SimenB
Copy link
Member Author

SimenB commented Jun 22, 2021

We're failing on CI using node 16.3.0 ourselves, on both mac and linux. Windows is passing. Not sure if it's the same failures or not, but it looks like the things we see on CI here (GH Actions times it out after 6 hours)

EDIT: might be nodejs/node#39019

@SimenB
Copy link
Member Author

SimenB commented Jun 28, 2021

@targos could you retry now 16.4.0 is out?

EDIT: no wait, the run thing doesn't work
EDIT2: OK, now 😀

This reverts commit 47bc8f4.
@targos
Copy link
Member

targos commented Jun 28, 2021

First try with GitHub actions: https://github.com/nodejs/citgm/actions/runs/980018267

@targos
Copy link
Member

targos commented Jun 29, 2021

@targos
Copy link
Member

targos commented Jun 29, 2021

The only error in CI is related to a full disk on one machine, merging!

@targos targos merged commit 5fd10b4 into nodejs:main Jun 29, 2021
@SimenB SimenB deleted the patch-1 branch June 29, 2021 09:50
@SimenB
Copy link
Member Author

SimenB commented Jun 29, 2021

Wonderful! Hopefully this can actually pick up all the regressions in async_hooks in the future 😅 Are CITGM not run before v16 releases? Or didn't a failing suite raise any flags due to the mongodb errors?

@targos
Copy link
Member

targos commented Jun 29, 2021

CITGM is always runs before a release. I suppose the mongodb errors prevented us from seeing the real issue.

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 this pull request may close these issues.

4 participants