Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Revert require.cache busting #482

Merged
merged 2 commits into from
Aug 24, 2018
Merged

Revert require.cache busting #482

merged 2 commits into from
Aug 24, 2018

Conversation

lhorie
Copy link
Contributor

@lhorie lhorie commented Aug 24, 2018

  • clearing require.cache was a workaround to prevent test failures when running server and browser tests concurrently. However, this workaround causes sporadic Module did not self-register errors from binary dependencies, which themselves cannot be worked around.
  • original issue was isolated in browser field is not respected in concurrent mode w/ multi-project config jestjs/jest#6887
  • new workaround: use fusion test --env node && fusion test --env jsdom instead of fusion test if you have server and browser tests running concurrently
  • downsides: coverage for node and jsdom tests are not consolidated

Next steps:

  • tell people to use the new workaround
  • wait for upstream fix in Jest

- clearing require.cache causes `Module did not self-register` error from binary dependencies
- original issue was isolated in jestjs/jest#6887
- workaround: `fusion test --env node && fusion test --env jsdom`
- downsides: coverage for node and jsdom tests are not consolidated

Next steps:

- tell people to use the workaround
- wait for upstream fix in Jest
@lhorie lhorie added the bugfix label Aug 24, 2018
@lhorie lhorie changed the title Reverts require.cache busting Revert require.cache busting Aug 24, 2018
@lhorie lhorie merged commit fb944f0 into master Aug 24, 2018
@AlexMSmithCA AlexMSmithCA mentioned this pull request Sep 5, 2018
@KevinGrandon KevinGrandon deleted the revert-require-cache-bust branch September 5, 2018 16:01
@mkrishnaatuber
Copy link

mkrishnaatuber commented Sep 10, 2018

Is any permanent fix in progress for this? Otherwise our project test coverage is constantly reported wrongly.

@KevinGrandon
Copy link
Contributor

Is any permanent fix in progress for this? Otherwise our project test coverage is constantly reported wrongly.

Yes, this was fixed in a recent version of fusion-cli, and should exist in 1.10.2.

Fix was here: 005516e

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

Successfully merging this pull request may close these issues.

3 participants