How to use the yeoman-generator.assert.file function in yeoman-generator

To help you get started, we’ve selected a few yeoman-generator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eguneys / generator-emberfs / test / test_route.js View on Github external
.on('end', function() {

                    assert.file([].concat(
                        defaultExpectedFiles,
                        'app/client/scripts/routes/test_deps.js',
                        'app/client/templates/test',
                        'app/client/templates/test/index.hbs'
                    ));

                    assert.fileContent('app/client/scripts/routes/test_route.js', /App.TestRoute = Ember.Route/);
                    assert.fileContent('app/client/scripts/routes/test_route.js', /requireLists: \['routes\/test_deps'\]/);

                    assert.fileContent('app/client/scripts/routes/test_deps.js', /'templates\/test'/);

                    // gulpfile requirejs modules injection
                    assert.fileContent('gulpfile.js',
                                       /gulp.task\('build-requirejs',[\s\S]*modules: \[[\s\S]+?\n? {12}\{[\s\S]+name: 'routes\/test_deps',[\s]+exclude: \['app\/common'][\s]+}[\s]+\]/);
                    
                    done();
github MicrosoftEdge / generator-appx / test / general.js View on Github external
it('creates expected files', function () {
    assert.file([
      '.gitignore',
      'gulpfile.babel.js/config.js',
      'gulpfile.babel.js/index.js',
      'gulpfile.babel.js/tasks/appx.js',
      'gulpfile.babel.js/tasks/bundle.js',
      'gulpfile.babel.js/tasks/browserSync.js',
      'gulpfile.babel.js/tasks/clean.js',
      'gulpfile.babel.js/tasks/deploy.js',
      'gulpfile.babel.js/tasks/minify.js',
      'gulpfile.babel.js/tasks/copy.js',
      'gulpfile.babel.js/util/handleErrors.js',
      'LICENSE',
      'package.json',
      'README.md',
      '.eslintrc',
      '.babelrc',
github passy / generator-bookmarklet / test / test-creation.js View on Github external
it('creates expected files', function () {
    var expected = [
      'package.json',
      '.gitignore',
      '.gitattributes',
      '.jshintrc',
      'gulpfile.js',
      'app/main.js'
    ];

    assert.file(expected);
  });
});
github johno / generator-p / test / test-app.js View on Github external
it('creates files', function () {
    assert.file([
      'package.json',
      '.editorconfig',
      'index.js',
      'README.md',
      'LICENSE.md',
      'test.js'
    ]);
  });
});
github TFaga / generator-react-reflux / test / test-app.js View on Github external
it('creates coffee and cjsx files', function () {
      assert.file([
        'app/scripts/app.coffee',
        'app/scripts/router.cjsx',
        'app/scripts/components/layout.cjsx',
        'app/scripts/components/home.cjsx',

        'gulpfile.coffee'
      ]);
    });
github jlouns / generator-gulp-angular-requirejs / test / base-test-suite.js View on Github external
it('creates test files', function() {
		assert.file([
			'test/karma.conf.js',
			'test/protractor.conf.js',
			'test/test-main.js'
		]);

		assert.file([
			'test/e2e/demo-spec.js',
			'test/e2e/main-spec.js',
			'test/unit/demo/app-title-spec.js',
			'test/unit/app-spec.js'
		]);
	});
github taiansu / generator-rf / test / test-app.js View on Github external
it('creates less files', function () {
      assert.file('src/assets/stylesheets/style.less');
    });
github NovaeWorkshop / Nova / test / api.js View on Github external
bangApi.run(function () {
                assert.file('server/api/user/index.js');
                assert.file('server/api/user/user.socket.js');
                assert.fileContent('server/config/sockets.js', 'require(\'../api/user/user.socket.js\').register(socket);');
                done();
            });
        });
github krakenjs / generator-kraken / test / controller.js View on Github external
testutil.run(base, function (err) {
            assert.file([
                'public/templates/ContentTest.dust'
            ]);

            done(err);
        });
    });
github NovaeWorkshop / Nova / test / font.js View on Github external
bangFont.run(function () {
                assert.file('client/assets/fonts/sushi');
                assert.file('client/styles/fonts.scss');

                setTimeout(function () {
                    assert.fileContent('client/styles/fonts.scss', 'url(\'/assets/fonts/sushi/sushi.eot\')');
                    assert.fileContent('client/styles/fonts.scss', 'url(\'/assets/fonts/sushi/sushi.woff\') format(\'woff\')');
                    assert.fileContent('client/styles/fonts.scss', 'url(\'/assets/fonts/sushi/sushi.otf\') format(\'opentype\')');
                    assert.fileContent('client/styles/fonts.scss', 'url(\'/assets/fonts/sushi/sushi.ttf\') format(\'truetype\')');
                    assert.fileContent('client/styles/fonts.scss', 'url(\'/assets/fonts/sushi/sushi.svg#sushi\') format(\'svg\')');
                    done();
                }, 30);

            });