runGen.withOptions(options).on('end', function() { assert.file([].concat( expected, 'app/styles/main.css', 'app/scripts/main.js' )); assert.noFile([ 'app/styles/main.less' ]); assert.fileContent(expectedContent); assert.noFileContent([ ['Gruntfile.js', /modernizr/], ['app/index.html', /modernizr/], ['bower.json', /modernizr/], ['package.json', /modernizr/], ['Gruntfile.js', /bootstrap/], ['app/index.html', /bootstrap/], ['bower.json', /bootstrap/], ['Gruntfile.js', /less/], ['.gitignore', /\.tmp/], ['app/index.html', /Less/], ['package.json', /grunt-contrib-less/], ['Gruntfile.js', /bootstrap-less/], ['bower.json', /bootstrap-less/] ]); done(); });
it('should create the directive and unit test files', function() { var expected = [ 'app/modules/core/directives/foo.js', 'app/modules/core/tests/unit/foo-directive.spec.js' ]; assert.file(expected); });
it('should create the filter and unit test files', function() { var expected = [ 'app/modules/core/filters/foo.js', 'app/modules/core/tests/unit/foo-filter.spec.js' ]; assert.file(expected); });
it('should create all the default files', function() { var expected = [ '.jshintrc', '.bowerrc', '.editorconfig', '.gitignore', 'README.md', '.travis.yml', 'Gruntfile.js', 'bower.json', 'karma.conf.js', 'package.json', 'protractor-desktop-config.js.js', 'app/css/customcordova.css', 'app/css/demo.css', 'app/img/loaders/loader.gif', 'app/index.html', 'app/js/application.js', 'app/js/config.js', 'app/modules/core/config/routes.js', 'app/modules/core/controllers/home.js', 'app/modules/core/core.js', 'app/modules/core/tests/e2e/home/home.po.js', 'app/modules/core/tests/e2e/home/home.spec.js', 'app/modules/core/tests/unit/home.spec.js', 'app/modules/core/views/home.html', 'www/.gitignore' ]; assert.file(expected); });
).on('end', function () { assert.file(expected); assert.fileContent([ ['app/manifest.json', /"browser_action": {\s+"default_icon": {\s+"19": "images\/icon-19.png",\s+"38": "images\/icon-38.png"\s+},\s+"default_title": "temp",\s+"default_popup": "popup.html"\s+}/] ]); done(); });
it('should generate e2e test folder which contains page object and test file', function() { var expected = [ 'app/modules/core/tests/e2e/foo.po.js', 'app/modules/core/tests/e2e/foo.spec.js' ]; assert.file(expected); });
runGen.withOptions(options).on('end', function () { assert.file([].concat( expected, 'app/styles/main.css', 'app/scripts/main.js' )); assert.noFile([ 'app/styles/main.scss', 'app/scripts/main.coffee' ]); assert.fileContent(expectedContent); assert.noFileContent([ ['Gruntfile.js', /coffee/], ['Gruntfile.js', /modernizr/], ['app/index.html', /modernizr/], ['bower.json', /modernizr/], ['package.json', /modernizr/], ['Gruntfile.js', /bootstrap/], ['app/index.html', /bootstrap/], ['bower.json', /bootstrap/], ['Gruntfile.js', /sass/], ['app/index.html', /Sass/], ['.gitignore', /\.sass-cache/], ['package.json', /grunt-contrib-sass/], ['package.json', /grunt-sass/], ['Gruntfile.js', /bootstrap-sass-official/], ['app/index.html', /Sass is a mature/], ['bower.json', /bootstrap-sass-official/] ]); done(); });
it('should create controller and test files', function() { var expected = [ 'app/modules/core/controllers/foo.js', 'app/modules/core/tests/unit/foo-controller.spec.js' ]; assert.file(expected); });
it('should create the partial, controller and controller unit test files', function() { var expected = [ 'app/modules/core/controllers/foo.js', 'app/modules/core/tests/unit/foo-controller.spec.js', 'app/modules/core/views/foo.html', ]; assert.file(expected); });
).on('end', function () { assert.file(expected); assert.fileContent([ ['bower.json', /"name": "temp"/], ['package.json', /"name": "temp"/], ['Gruntfile.js', /\/\/ No UI feature selected, cssmin task will be commented\n\s+\/\/ 'cssmin'/] ]); done(); });
).on('end', function () { assert.file(expected); assert.fileContent([ ['bower.json', /"name": "temp"/], ['package.json', /"name": "temp"/], ['app/manifest.json', /"options_page": "options.html"/] ]); done(); });
runGen.withOptions(options).on('end', function () { assert.file([].concat( expected, 'app/scripts/hello.coffee' )); assert.fileContent(expectedContent); assert.noFileContent([].concat(fontawesomeExpectedContent, jsBootstrapExpectedContent)); done(); });
).on('end', function () { assert.file([].concat( expected, 'app/scripts/main.coffee' )); assert.noFile('app/scripts/main.js'); assert.fileContent([].concat( expectedContent, [['Gruntfile.js', /coffee/]] )); done(); });
.on('end', function() { assert.file([].concat( expected )); assert.noFile([].concat( noFile )); assert.fileContent([].concat( expectedContent )); assert.noFileContent([].concat( nonExpected )); done(); });
build.on('close', function (code) { assert.file([ 'public/components/requirejs/require.js', 'tasks/copy-browser-modules.js' ]); assert.noFile([ '.bowerrc' ]); assert.fileContent([ ['package.json', new RegExp(/(browserPackage)/)], ['package.json', new RegExp(/(overrides)/)], ['Gruntfile.js', new RegExp(/(postinstall.+copy\-browser\-modules)/)] ]); assert.strictEqual(code, 0); done(err); });
it('should generate an angular directive file', function(done) { assert.file('modules/core/directives/foo.directive.js'); done(); });
test.on('end', function(err) { assert.ifError(err); assert.file('.test/publish/index.html', 'test/fixtures/default/expected.html'); });
.on('end', function ( ) { assert.file( _.extend(expectedFiles, expectedFilesLess)); done(); });
.on('end', function ( ) { assert.file(expectedFiles); assert.noFile(expectedFilesLess); done(); });
it('should generate a unit test file for a filter', function() { var expected = [ 'app/modules/core/tests/unit/foounit-filter.spec.js' ]; assert.file(expected); });
it( 'package.json exists', function ( done ) { assert.file( path.join( gruntDir, 'package.json' ) ); done(); } );
it('should create the partial file', function() { var expected = [ 'app/modules/core/config/foo.js' ]; assert.file(expected); });
it('should create the test and controller js file', function() { var expected = [ 'app/modules/core/views/foo.html' ]; assert.file(expected); });
it('should create the service constant js file', function() { var expected = [ 'app/modules/core/services/cons.js' ]; assert.file(expected); });
it('should create the service Value js file', function() { var expected = [ 'app/modules/core/services/valu.js' ]; assert.file(expected); });
test.on('end', function(err) { assert.ifError(err); assert.file('.test/usemin.html', 'test/fixtures/default/usemin.html'); });
this.app.run({}, function () { assert.file(expected); done(); });
it('should create the service Provider js file', function() { var expected = [ 'app/modules/core/services/prov.js' ]; assert.file(expected); });
it('should create the service Factory js file', function() { var expected = [ 'app/modules/core/services/fact.js' ]; assert.file(expected); });
return run(mockPromptOptions, function (done) { assert.file(expected); done(); });