Skip to content

Commit

Permalink
Fix for run extension tests with commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Jan 25, 2016
1 parent 0587f20 commit 341122a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
13 changes: 6 additions & 7 deletions test/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function loadClientTests(cb) {
return file.replace(/\.js$/, '');
});

// load all modules
// load all modules with the AMD loader
define(modules, function () {
cb(null);
}, cb);
Expand All @@ -61,13 +61,12 @@ function loadPluginTests(cb) {
var root = path.join(path.dirname(__dirname), 'extensions');
glob(TEST_GLOB, { cwd: root }, function (err, files) {

// load modules with commonjs
var modules = files.map(function (file) {
return 'extensions/' + file.replace(/\.js$/, '');
return '../extensions/' + file.replace(/\.js$/, '');
});

define(modules, function() {
cb(null);
}, cb);
modules.forEach(require);
cb(null);
});
}

Expand Down Expand Up @@ -142,7 +141,7 @@ function main() {
}));
} else {
loadTasks.push(loadClientTests);
//loadTasks.push(loadPluginTests);
loadTasks.push(loadPluginTests);
}

async.parallel(loadTasks, function (err) {
Expand Down
1 change: 0 additions & 1 deletion test/mocha.opts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
--ui tdd
--reporter dot
test/all.js
extensions/**/test/*.test.js

0 comments on commit 341122a

Please sign in to comment.