Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Commit

Permalink
fix: regression in mocha initialization (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
AviVahl authored and evilebottnawi committed Aug 12, 2019
1 parent 1c2769f commit c487afe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export function pitch(req) {

const source = [];
if (this.target === 'web' || this.target === 'electron-renderer') {
source.push(`import ${JSON.stringify(`!!${webScriptPath}`)};`);
source.push(`require(${JSON.stringify(`!!${webScriptPath}`)});`);
source.push(
"if(typeof window !== 'undefined' && window.initMochaPhantomJS) { window.initMochaPhantomJS(); }"
);
source.push(`mocha.setup(${JSON.stringify(options)});`);
source.push(`import ${JSON.stringify(`!!${req}`)}`);
source.push(`import ${JSON.stringify(`!!${startScriptPath}`)};`);
source.push(`require(${JSON.stringify(`!!${req}`)});`);
source.push(`require(${JSON.stringify(`!!${startScriptPath}`)});`);
source.push('if(module.hot) {');
source.push('\tmodule.hot.accept();');
source.push('\tmodule.hot.dispose(function() {');
Expand Down

0 comments on commit c487afe

Please sign in to comment.