1
+ 'use strict' ;
2
+ import path from 'path' ;
3
+ import fs from 'fs' ;
4
+ import _ from 'lodash' ;
5
+ import Promise from 'bluebird' ;
6
+ Promise . promisifyAll ( fs ) ;
7
+ import helpers from 'yeoman-test' ;
8
+ import assert from 'yeoman-assert' ;
9
+ import minimatch from 'minimatch' ;
10
+ import * as getExpectedFiles from './get-expected-files' ;
11
+ import {
12
+ copyAsync ,
13
+ runCmd ,
14
+ assertOnlyFiles ,
15
+ getConfig
16
+ } from './test-helpers' ;
17
+
18
+ describe ( 'test fixtures' , function ( ) {
19
+ it ( 'should have package.json in fixtures' , function ( ) {
20
+ assert . file ( [ path . join ( __dirname , 'fixtures' , 'package.json' ) ] ) ;
21
+ } ) ;
22
+
23
+ it ( 'should have bower.json in fixtures' , function ( ) {
24
+ assert . file ( [ path . join ( __dirname , 'fixtures' , 'bower.json' ) ] ) ;
25
+ } ) ;
26
+
27
+ it ( 'should have all npm packages in fixtures/node_modules' , function ( ) {
28
+ var packageJson = require ( './fixtures/package.json' ) ;
29
+ var deps = Object . keys ( packageJson . dependencies ) ;
30
+ deps = deps . concat ( Object . keys ( packageJson . devDependencies ) ) ;
31
+ deps = deps . map ( function ( dep ) {
32
+ return path . join ( __dirname , 'fixtures' , 'node_modules' , dep ) ;
33
+ } ) ;
34
+ assert . file ( deps ) ;
35
+ } ) ;
36
+
37
+ it ( 'should have all bower packages in fixtures/bower_components' , function ( ) {
38
+ var bowerJson = require ( './fixtures/bower.json' ) ;
39
+ var deps = Object . keys ( bowerJson . dependencies ) ;
40
+ deps = deps . concat ( Object . keys ( bowerJson . devDependencies ) ) ;
41
+ deps = deps . map ( function ( dep ) {
42
+ return path . join ( __dirname , 'fixtures' , 'bower_components' , dep ) ;
43
+ } ) ;
44
+ assert . file ( deps ) ;
45
+ } ) ;
46
+ } ) ;
0 commit comments