1 | import helpers from 'yeoman-test'
|
2 | import assert from 'yeoman-assert'
|
3 | import path from 'path'
|
4 | import { webpack as webpackFiles } from '../app/filesToAssert'
|
5 |
|
6 | describe('Script features', function () {
|
7 | beforeEach(function () {
|
8 | return helpers.run(path.join(__dirname, '../app'))
|
9 | .withOptions({
|
10 | 'skip-install': true
|
11 | })
|
12 | .withPrompts({
|
13 | projectName: 'Pixel2HTML',
|
14 | qtyScreens: 3,
|
15 | markupLanguage: 'html',
|
16 | frontEndFramework: 'bootstrap-4',
|
17 | jQuery: true
|
18 | })
|
19 | .toPromise()
|
20 | })
|
21 |
|
22 | it('creates expected base files', function () {
|
23 | assert.file([
|
24 | 'src/assets/js/index.js',
|
25 | 'src/assets/js/app.js',
|
26 | 'webpack.config.js',
|
27 | ...webpackFiles
|
28 | ])
|
29 | })
|
30 |
|
31 | it('should exists a gulp routine', function () {
|
32 | assert.file([
|
33 | 'gulp/common/scripts.js'
|
34 | ])
|
35 | })
|
36 |
|
37 | it('should have the project name on package.json', function () {
|
38 | assert.fileContent('src/assets/js/app.js', /Pixel2HTML/)
|
39 | })
|
40 | })
|