Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

ensure bundle dir is set before trying to write somewhere in Karma

Christopher Hiller7240300672a2
diff --git a/karma.conf.js b/karma.conf.js
index 926cb7c9..d6c6fe76 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -35,7 +35,7 @@ module.exports = function(config) {
.ignore('supports-color')
.exclude('./lib-cov/mocha')
.on('bundled', function(err, content) {
- if (!err) {
+ if (!err && bundleDirpath) {
// write bundle to directory for debugging
fs.writeFileSync(path.join(bundleDirpath,
'bundle.' + Date.now() + '.js'), content);