blob: 98be88b240d428eedfb59e982aa6344f9c46818f [file] [log] [blame]
Matteo Scandolo124bbfc2016-05-11 09:03:25 -07001'use strict';
2
3const path = require('path');
4const helpers = require('yeoman-test');
5const assert = require('yeoman-assert');
6
7const testPath = path.join(__dirname, '../../../ngXosViews/test-name/');
8
9const getDefaultFiles = () => {
10 return [
11 testPath + 'src/index.html',
12 testPath + '.bowerrc',
13 testPath + '.gitignore',
14 testPath + '.eslintrc',
15 testPath + 'gulpfile.js',
16 testPath + 'package.json',
17 testPath + 'bower.json'
18 ];
19};
20
21describe('Yeoman XOS generator', function () {
22
23 beforeEach(function () {
24 this.generator = helpers
25 .run(require.resolve('../app'))
26 .inDir(testPath)
27 .withOptions({ 'skip-install': true })
28 .withPrompts({
29 name: 'test-name',
30 host: 'test-host',
31 token: 'test-token',
32 session: 'test-session'
33 });
34 });
35
36 describe('default settings', function () {
37 beforeEach(function (done) {
38 this.generator.on('end', done);
39 });
40
41 it('generate base files', function () {
42 assert.file(getDefaultFiles());
43 });
44 });
45});