You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.
I've got test-bed set up and it works quite well. I've wrote some tests using async/await. Unfortunately, it shows only the transpiled code in mocha. Then I added babel-plugin-istanbul to the project, and now I also get coverage's code in mocha.
Examples:
// INit('should play a beep',()=>{sound.playSound();assert.isFalse(audioEl.paused,'is not playing');});// OUT++cov_2d2ry0wax2.f[4];++cov_2d2ry0wax2.s[8];sound.playSound();++cov_2d2ry0wax2.s[9];assert.isFalse(audioEl.paused,'is not playing');// INit('should have stopped',async()=>{awaitstopPromise;assert.isTrue(audioEl.paused,'is not stopped');});// OUTvargen=fn.apply(this,arguments);returnnewPromise(function(resolve,reject){functionstep(key,arg){try{varinfo=gen[key](arg);varvalue=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{returnPromise.resolve(value).then(function(value){step("next",value);},function(err){step("throw",err);});}}returnstep("next");});
I've already tried to play around with the configs in createServer.js, nothing worked so far. Can someone please point me into the right direction?
Unfortunately, Mocha uses fn.toString() to obtain the function’s body. This behavior is not customizable, which means Mocha will always show the transpiled source code. To make it display original source code requires complex instrumentation of the code, so I think it’s going to be hard to implement this.
I recommend using your browser’s dev tools to debug a test.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've got test-bed set up and it works quite well. I've wrote some tests using async/await. Unfortunately, it shows only the transpiled code in mocha. Then I added
babel-plugin-istanbul
to the project, and now I also get coverage's code in mocha.Examples:
I've already tried to play around with the configs in
createServer.js
, nothing worked so far. Can someone please point me into the right direction?Here is my
webpack.config.test.js
file: https://pastebin.com/SWzkDjwVThe text was updated successfully, but these errors were encountered: