girder / girder_web_components

Reusable Javascript and VueJS components for interacting with a Girder server.
https://gwc.girder.org
Apache License 2.0
16 stars 9 forks source link

Version incompatibility jest#6913 ? #176

Closed subdavis closed 4 years ago

subdavis commented 4 years ago

From a fresh clone I was not able to run any unit tests on my laptop.

https://github.com/facebook/jest/issues/6913#issuecomment-423660110

I ran:

yarn remove babel-jest
yarn add babel-jest -D

and the issue went away. I don't understand how tests can be passing on CI and my desktop but be broken from my laptop (same version of node, npm, yarn).

/shrug

Before this fix

 FAIL  tests/unit/job/Status.spec.js
  ● Test suite failed to run

    Cannot find module '/home/brandon/github.com/girder_web_components/node_modules/@babel/runtime/helpers/builtin/interopRequireWildcard' from 'Status.spec.js'

      1 | import * as status from '@/components/Job/status';
      2 | 
    > 3 | describe('job/status', () => {
        |                               ^
      4 |   it('get a built in status by key', () => {
      5 |     expect(status.get('SUCCESS').value).toBe(3);
      6 |   });

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
      at Object.<anonymous> (tests/unit/job/Status.spec.js:3:31)

Test Suites: 16 failed, 16 total
Tests:       0 total
Snapshots:   0 total
Time:        1.653s, estimated 17s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
subdavis commented 4 years ago

Still not able to reproduce on desktop, still not able to run without this change on laptop.

If nothing else, it's good to stay up-to-date.