mochapack
mochapack copied to clipboard
[Feature] Implement the `require` interface
Hey there @vlasenko first of all, thanks for this fork, works great.
Would you consider implementing the require
interface? https://mochajs.org/#require
It seems like only bdd
, tdd
, qunit
and exports
were implemented.
@sebastienfilion Have you tried to run it with mochapack -u require ...
?
Yes I have and I get an error saying that require
is not a module;
Is it an issue with my Webpack configuration?
I just never knew that feature to be an external module.
Error: Cannot find module 'PATH_TO_PROJECT/require'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function._resolveFilename (/usr/local/lib/node_modules/mochapack/lib/util/registerRequireHook.js:44:34)
at Function.resolve (internal/modules/cjs/helpers.js:30:19)
@sebastienfilion Can you give this a shot using 2.0.0
? If it works and you don't run into an issue similar to #65 then we can resolve this issue.
Thanks