Skip to content

Commit

Permalink
fix(featuresloader.js): pass spec as string to createTestsFromFeature fn
Browse files Browse the repository at this point in the history
All test cases now passing

fix #415
  • Loading branch information
ralphsaunders authored and lgandecki committed Jul 19, 2020
1 parent cbe8c6e commit bc6dfb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/featuresLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const createCucumber = (
window.cucumberJson = ${JSON.stringify(cucumberJson)};
var moduleCache = arguments[5];
function clearFromCache(moduleId, instance){
if(isWebpack()){
delete require.cache[moduleId];
} else {
clearFromCacheBrowserify(instance);
}
}
function isWebpack(){
return !!require.cache
}
Expand Down Expand Up @@ -60,10 +60,10 @@ const createCucumber = (
nonGlobalToRequire
.find(fileSteps => fileSteps[filePath])
[filePath].join("\n")}
createTestsFromFeature('${path.basename(filePath)}', \`${jsStringEscape(
createTestsFromFeature('${path.basename(filePath)}', '${jsStringEscape(
spec
)}\`);
)}');
})
`
)
Expand Down

0 comments on commit bc6dfb3

Please sign in to comment.