Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(function (done) {
var deps = [
'../../app',
'../../model',
'../../collection',
'../../view',
'../../router', [
helpers.createDummyGenerator(),
'buster:app'
]
];
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
backbone = helpers.createGenerator('backbone-amd:app', deps);
done();
});
});
describe('node-webkit:app', function () {
var defaultOptions = {
'appname': 'TestApp',
'description': 'Test Description',
'username': 'Test User',
'examples': false
},
testDirectoryPath = path.join(__dirname, 'app.tmp'),
testDirectory = helpers.setUpTestDirectory(testDirectoryPath),
deps = ['../../generators/app', [helpers.createDummyGenerator(), 'node-webkit:download']];
beforeEach(function (done) {
testDirectory(function () {
fs.emptyDirSync(testDirectoryPath);
fs.writeJsonSync(testDirectoryPath + '/.yo-rc.json', {'generator-node-webkit': {}});
fs.symlinkSync(__dirname + '/fixtures/node_modules', testDirectoryPath + '/node_modules');
done();
});
});
afterEach(function (done) {
fs.remove(testDirectoryPath, done);
});
describe('Running app', function () {
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('angular-with-require:app', [
'../../app', [
helpers.createDummyGenerator(),
'mocha:app'
]
]);
done();
}.bind(this));
});
run: function (callback) {
var generator = helpers.run('generator-webapp')
.inDir(this.directory)
.withOptions(options)
.withGenerators([[helpers.createDummyGenerator(), testGeneratorName]])
.withPrompt({
features: ['includeBootstrap']
})
.on('end', callback);
generator.options.skipInstall = true;
},
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.angulpify = helpers.createGenerator('angulpify:app', [
'../../app', [
helpers.createDummyGenerator(),
'mocha:app'
]
]);
this.angulpify.options['skip-install'] = true;
done();
}.bind(this));
});
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('rails-angular-require:app', [
'../../app', [
helpers.createDummyGenerator(),
'mocha:app'
]
]);
done();
}.bind(this));
});
helpers.testDirectory(path.join(__dirname, 'slug'), function(err) {
if (err) {
return done(err);
}
this.webapp = helpers.createGenerator('gulp-angular-semantic-ui:app', [
'../../app', [
helpers.createDummyGenerator(),
'mocha:app'
]
]);
this.webapp.options['skip-install'] = true;
done();
}.bind(this));
});
helpers.testDirectory(path.join(__dirname, 'gulp-file'), function(err) {
if (err) {
return done(err);
}
this.webapp = helpers.createGenerator('gulp-angular-semantic-ui:app', [
'../../app', [
helpers.createDummyGenerator(),
'mocha:app'
]
]);
this.webapp.options['skip-install'] = true;
done();
}.bind(this));
});
beforeEach(function (done) {
var deps = [
'../../app',
'../../common',
'../../controller',
'../../main', [
helpers.createDummyGenerator(),
'karma:app'
]
];
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
done(err);
}
angular = helpers.createGenerator('angular-cordova:app', deps);
angular.options['skip-install'] = true;
done();
});
});