Skip to content

Conversation

rchl
Copy link
Collaborator

@rchl rchl commented Mar 25, 2020

This commit includes renovate deps update and a fix for tests.

renovate-bot and others added 2 commits March 22, 2020 19:07
The plugin's apply function doesn't pass schema validation. Schema
expects an instance of Function while `plugin.apply instanceof Function`
return `false`.

The issue has to do with how the new version of fork-ts-checker-webpack-plugin
is compiled. Previously it targeted es6 and code was compiled into classes
where methods pass the `instanceof Function` check while currently it's
compiled to es5 target and methods are added through prototype chain and
no longer pass `instanceof Function` check.

This problem only manifests itself when combined with jest mocking the
function (bug jestjs/jest#6329 which is a duplicate of unsolved one).

Fix by mocking the creating a fresh mock implementation instead of
augmenting original plugin.

Resolves #273
Copy link
Contributor

@kevinmarrec kevinmarrec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @rchl !!

@kevinmarrec kevinmarrec added the dependencies Pull requests that update a dependency file label Mar 27, 2020
@kevinmarrec kevinmarrec merged commit d8ecab5 into nuxt:master Mar 27, 2020
@rchl rchl deleted the fix/fork-ts-checker-4 branch April 4, 2020 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants