Skip to content

Commit b2dd53d

Browse files
author
JelteMX
committed
Fix tests
1 parent a52cf60 commit b2dd53d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

generators/app/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ module.exports = yeoman.generators.Base.extend({
300300
},
301301

302302
end: function () {
303-
this.log('\n\n> I will now run ' + chalk.cyan('grunt build') + ' to build the mpk < \n\n');
303+
this.log('\n\n> I will now run ' + chalk.cyan('grunt build') + ' to build the mpk (do this before starting the modeler)< \n\n');
304304
this.spawnCommand('grunt', ['build']);
305305
}
306306
});

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
},
3939
"devDependencies": {
4040
"mocha": "*",
41+
"mock-spawn": "^0.2.6",
4142
"string-template": "^0.2.1"
4243
}
4344
}

test/test-app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
/*global it,before,describe*/
2+
/*jshint -W108,-W069*/
23
'use strict';
34

45
var path = require('path');
56
var assert = require('yeoman-generator').assert;
67
var helpers = require('yeoman-generator').test;
78
var format = require('string-template');
9+
var mockSpawn = require('mock-spawn');
810

911
describe('Mendix generator:', function () {
1012

1113
var customWidgetName = 'TESTWIDGET';
14+
var mySpawn = mockSpawn();
15+
require('child_process').spawn = mySpawn;
16+
17+
mySpawn.setDefault(mySpawn.simple(0, ''));
1218

1319
before(function (done) {
1420
helpers.run(path.join(__dirname, '../generators/app'))

0 commit comments

Comments
 (0)