webpack-contrib / bundle-loader

Bundle Loader
MIT License
658 stars 59 forks source link

Using Mocha Test #59

Closed treyspiva closed 4 years ago

treyspiva commented 7 years ago

I am using the loader syntax in a require statement. Everything is working fine, until I go to execute or mocha test. At that point I am getting the following error. Does anyone know how to get around the error?

Error: Cannot find module 'bundle-loader!./index'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:/Development/Workspaces/.../file.js:21:11)
    at Module._compile (module.js:570:32)
    ...
alexander-akait commented 4 years ago

Please open an issue in mocha repo, you can mock module and return any value for tests, sorry for delay