Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should generate a new scene', function(done) {
var name = 'foo';
var deps = [path.join('../../', 'scene')];
var smarttvGenerator = helpers.createGenerator('smarttv:scene', deps, [name]);
helpers.mockPrompt(this.app, {
features: ['includeCompass'],
apptype: 'Video'
});
this.app.options['skip-install'] = true;
this.app.run({}, function() {
smarttvGenerator.run({}, function() {
helpers.assertFiles([
'src/app/scenes/Foo.js',
'src/app/htmls/Foo.html',
'src/app/stylesheets/Foo.css',
]);
done();
});
helpers.testDirectory(this.tmpDir, function (err) {
if (err) {
return done(err);
}
fs.writeFileSync(path.join(this.tmpDir, 'package.json'), JSON.stringify({
name: 'testproj',
version: '1.3.7'
}));
this.app = helpers.createGenerator('heroku:app', [
'../../app'
]);
done();
}.bind(this));
});
beforeEach(function () {
gen = helpers.createGenerator('node-webkit:app', deps, [], {
'skip-install': true,
'skip-welcome': true
});
helpers.mockPrompt(gen, defaultOptions);
});
helpers.testDirectory(path.join(__dirname, 'temp'), function(err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('frontend:sass', [
'../../sass'
]);
this.app.options['skip-install'] = true;
done();
}.bind(this));
});
helpers.testDirectory(path.join(__dirname, './.tmp'), function (err) {
if (err) {
return done(err);
}
this.footguard = {};
this.footguard.app = helpers.createGenerator('footguard:app', [
'../../app'
]);
this.footguard.app.options['skip-install'] = true;
this.footguard.app.run({}, function() {
done();
});
}.bind(this));
});
react.run({}, function() {
var generator =
helpers.createGenerator(
'react-webpack:store',
[path.join('../../store')],
['Test'],
{ appPath: 'src' }
);
react.run([], function() {
generator.run([], function() {
done();
});
});
});
});
baseGenerator(function() {
factoryGen = helpers.createGenerator('angular-enterprise:factory', [path.join(__dirname, '../generators/factory')], ['myFactory']);
done();
});
});
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('sp:app', [
'../../app'
]);
done();
}.bind(this));
});
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
}
this.app = helpers.createGenerator('yeogurt:app', [
'../../app'
]);
done();
}.bind(this));
});