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

[Bug] v2.0.1 breaks testing in Nuxt project #75

Closed
1 task
AbleLincoln opened this issue Jun 24, 2020 · 7 comments
Closed
1 task

[Bug] v2.0.1 breaks testing in Nuxt project #75

AbleLincoln opened this issue Jun 24, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@AbleLincoln
Copy link

AbleLincoln commented Jun 24, 2020

  • I'd be willing to submit the fix

Describe the bug

v2.0.1 breaks testing for Nuxt project (with Vuetify). This may be happening with other frameworks/setups, but I discovered this bug with a Nuxt project. Essentially, the tests no longer run. mochapack is able to succesfully compile the project, but it doesn't run any of the tests. It just completes with "0 passing".

I think I have narrowed this down to the change addressed in this commit. chunk.isOnlyInitial() properly chunks the modules, but chunk.hasEntryModule() appears to only pass for a single chunk.

To Reproduce

See this repo

Environment if relevant (please complete the following information):

  • OS: Linux
  • Node version: 12.16.3
  • Mochapack version: 2.0.1
  • Webpack version: 4.43.0
@AbleLincoln AbleLincoln added the bug Something isn't working label Jun 24, 2020
@AbleLincoln
Copy link
Author

btw, I am able to fix this problem by locking mochapack at v2.0.0

@AbleLincoln
Copy link
Author

I'm not sure if this is related, but I also came across this solution for a similar issue with mocha-wepack. Apparently optimization.runtimeChunk = "single" and mocha do not play nicely together.

@larixer
Copy link
Member

larixer commented Jun 25, 2020

@AbleLincoln Thanks, I've rolled back PR #70 for now to fix this issue and published mochapack@2.0.2

@larixer larixer closed this as completed Jun 25, 2020
@AbleLincoln
Copy link
Author

Still getting this issue in v2.0.2. It looks like the build didn't work for some reason. The published JS files still have broken the code from 2.0.1.

@larixer
Copy link
Member

larixer commented Jul 10, 2020

@AbleLincoln Published mochapack@2.0.3, could you check and report back, please?

@AbleLincoln
Copy link
Author

Works great! Thank you 🙂

@larixer
Copy link
Member

larixer commented Jul 10, 2020

Thank you for letting know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants