
'use strict';
const path = require('path');
const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const rimraf = require('rimraf');
const fse = require('fs-extra');
const testUtils = require('./testUtils');

/**
 * Directory name to run the generator
 */
const target = '../app';

/**
 * Subgenerators composed with the `init-app` subgenerator.
 */
const GENERATOR_DEPENDENCIES = [
  '../generators/_node',
  '../generators/init-lib',
  '../generators/_init-web',
  '../generators/_check-own-version',
  '../generators/check-node-version',
];

describe('generate app plugin with prompt `app: appName` and the rest default prompt values', () => {


  beforeAll(() => {
    return helpers
      .run(path.join(__dirname, '../generators/init-app'))
      .inDir(path.join(__dirname, target), () => null)
      .withPrompts({
          app:'appName'
      })
      .withGenerators(GENERATOR_DEPENDENCIES);
  });

  afterAll(() => {
    rimraf.sync(path.join(__dirname, target));
  });

  it('generates `package.json` with correct devDependencies', () => {
    const initWebPackage = fse.readJSONSync(testUtils.templatePath('_init-web', 'package.tmpl.json'));
    assert.jsonFileContent('package.json', {devDependencies: initWebPackage.devDependencies});
  });
});
@@ -1276,12 +1276,134 @@
 );%0A  %7D);
+%0A%0A  it('generates %60.gitignore%60 that has no %60/dist/%60 entry', () =%3E %7B%0A    assert.noFileContent('.gitignore','/dist/');%0A  %7D);
 %0A%7D);

Extend tests