@@ -8,13 +8,8 @@ var pkg = require(path.resolve("package.json"));
88var cli = require ( path . resolve ( pkg . bin ) ) ;
99
1010describe ( "E2E CLI `files` arg - multi globs" , function ( ) {
11-
12- var instance ;
13-
14- before ( function ( done ) {
15-
11+ it ( "Converts cli files arg to correct namespaced watchers" , function ( done ) {
1612 browserSync . reset ( ) ;
17-
1813 cli ( {
1914 cli : {
2015 input : [ "start" ] ,
@@ -25,28 +20,18 @@ describe("E2E CLI `files` arg - multi globs", function () {
2520 }
2621 } ,
2722 cb : function ( err , bs ) {
28- instance = bs ;
23+ assert . equal ( bs . options . getIn ( [ "files" , "core" , "globs" ] ) . size , 2 ) ;
24+ assert . isTrue ( Array . isArray ( bs . watchers . core . watchers ) ) ;
25+ bs . cleanup ( ) ;
2926 done ( ) ;
3027 }
3128 } ) ;
3229 } ) ;
33- after ( function ( ) {
34- instance . cleanup ( ) ;
35- } ) ;
36- it ( "Converts cli files arg to correct namespaced watchers" , function ( ) {
37- assert . equal ( instance . options . getIn ( [ "files" , "core" , "globs" ] ) . size , 2 ) ;
38- assert . isTrue ( Array . isArray ( instance . watchers . core . watchers ) ) ;
39- } ) ;
4030} ) ;
4131
4232describe ( "E2E CLI `files` arg, single glob" , function ( ) {
43-
44- var instance ;
45-
46- before ( function ( done ) {
47-
33+ it ( "Converts cli files arg to correct namespaced watchers" , function ( done ) {
4834 browserSync . reset ( ) ;
49-
5035 cli ( {
5136 cli : {
5237 input : [ "start" ] ,
@@ -57,17 +42,11 @@ describe("E2E CLI `files` arg, single glob", function () {
5742 }
5843 } ,
5944 cb : function ( err , bs ) {
60- instance = bs ;
45+ assert . equal ( bs . options . getIn ( [ "files" , "core" , "globs" ] ) . size , 1 ) ;
46+ assert . isTrue ( Array . isArray ( bs . watchers . core . watchers ) ) ;
47+ bs . cleanup ( ) ;
6148 done ( ) ;
6249 }
6350 } ) ;
6451 } ) ;
65- after ( function ( ) {
66- instance . cleanup ( ) ;
67- } ) ;
68- it ( "Converts cli files arg to correct namespaced watchers" , function ( ) {
69- assert . equal ( instance . options . getIn ( [ "files" , "core" , "globs" ] ) . size , 1 ) ;
70-
71- assert . isTrue ( Array . isArray ( instance . watchers . core . watchers ) ) ;
72- } ) ;
7352} ) ;
0 commit comments