99 . dontMock ( '../docblock' )
1010 . setMock ( '../../../ModuleDescriptor' , function ( data ) { return data ; } ) ;
1111
12- var q = require ( 'q' ) ;
13-
1412describe ( 'DependencyGraph' , function ( ) {
1513 var DependencyGraph ;
1614 var fileWatcher ;
@@ -46,7 +44,10 @@ describe('DependencyGraph', function() {
4644 }
4745 } ) ;
4846
49- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
47+ var dgraph = new DependencyGraph ( {
48+ roots : [ root ] ,
49+ fileWatcher : fileWatcher
50+ } ) ;
5051 return dgraph . load ( ) . then ( function ( ) {
5152 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
5253 . toEqual ( [
@@ -75,7 +76,10 @@ describe('DependencyGraph', function() {
7576 }
7677 } ) ;
7778
78- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
79+ var dgraph = new DependencyGraph ( {
80+ roots : [ root ] ,
81+ fileWatcher : fileWatcher
82+ } ) ;
7983 return dgraph . load ( ) . then ( function ( ) {
8084 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
8185 . toEqual ( [
@@ -105,7 +109,10 @@ describe('DependencyGraph', function() {
105109 }
106110 } ) ;
107111
108- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
112+ var dgraph = new DependencyGraph ( {
113+ roots : [ root ] ,
114+ fileWatcher : fileWatcher
115+ } ) ;
109116 return dgraph . load ( ) . then ( function ( ) {
110117 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
111118 . toEqual ( [
@@ -135,7 +142,10 @@ describe('DependencyGraph', function() {
135142 }
136143 } ) ;
137144
138- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
145+ var dgraph = new DependencyGraph ( {
146+ roots : [ root ] ,
147+ fileWatcher : fileWatcher
148+ } ) ;
139149 return dgraph . load ( ) . then ( function ( ) {
140150 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
141151 . toEqual ( [
@@ -175,7 +185,10 @@ describe('DependencyGraph', function() {
175185 }
176186 } ) ;
177187
178- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
188+ var dgraph = new DependencyGraph ( {
189+ roots : [ root ] ,
190+ fileWatcher : fileWatcher
191+ } ) ;
179192 return dgraph . load ( ) . then ( function ( ) {
180193 expect ( dgraph . getOrderedDependencies ( '/root/somedir/somefile.js' ) )
181194 . toEqual ( [
@@ -216,7 +229,10 @@ describe('DependencyGraph', function() {
216229 }
217230 } ) ;
218231
219- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
232+ var dgraph = new DependencyGraph ( {
233+ roots : [ root ] ,
234+ fileWatcher : fileWatcher
235+ } ) ;
220236 return dgraph . load ( ) . then ( function ( ) {
221237 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
222238 . toEqual ( [
@@ -245,7 +261,10 @@ describe('DependencyGraph', function() {
245261 }
246262 } ) ;
247263
248- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
264+ var dgraph = new DependencyGraph ( {
265+ roots : [ root ] ,
266+ fileWatcher : fileWatcher
267+ } ) ;
249268 return dgraph . load ( ) . then ( function ( ) {
250269 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
251270 . toEqual ( [
@@ -280,7 +299,10 @@ describe('DependencyGraph', function() {
280299 }
281300 } ) ;
282301
283- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
302+ var dgraph = new DependencyGraph ( {
303+ roots : [ root ] ,
304+ fileWatcher : fileWatcher
305+ } ) ;
284306 return dgraph . load ( ) . then ( function ( ) {
285307 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
286308 . toEqual ( [
@@ -320,7 +342,10 @@ describe('DependencyGraph', function() {
320342 }
321343 } ) ;
322344
323- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
345+ var dgraph = new DependencyGraph ( {
346+ roots : [ root ] ,
347+ fileWatcher : fileWatcher
348+ } ) ;
324349 return dgraph . load ( ) . then ( function ( ) {
325350 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
326351 . toEqual ( [
@@ -360,7 +385,10 @@ describe('DependencyGraph', function() {
360385 }
361386 } ) ;
362387
363- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
388+ var dgraph = new DependencyGraph ( {
389+ roots : [ root ] ,
390+ fileWatcher : fileWatcher
391+ } ) ;
364392 return dgraph . load ( ) . then ( function ( ) {
365393 expect ( dgraph . getOrderedDependencies ( '/root/index.js' ) )
366394 . toEqual ( [
@@ -386,7 +414,6 @@ describe('DependencyGraph', function() {
386414 } ) ;
387415
388416 describe ( 'file watch updating' , function ( ) {
389- var fileWatcher ;
390417 var triggerFileChange ;
391418
392419 beforeEach ( function ( ) {
@@ -428,7 +455,10 @@ describe('DependencyGraph', function() {
428455 }
429456 } ) ;
430457
431- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
458+ var dgraph = new DependencyGraph ( {
459+ roots : [ root ] ,
460+ fileWatcher : fileWatcher
461+ } ) ;
432462 return dgraph . load ( ) . then ( function ( ) {
433463 filesystem . root [ 'index.js' ] =
434464 filesystem . root [ 'index.js' ] . replace ( 'require("foo")' , '' ) ;
@@ -476,7 +506,10 @@ describe('DependencyGraph', function() {
476506 }
477507 } ) ;
478508
479- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
509+ var dgraph = new DependencyGraph ( {
510+ roots : [ root ] ,
511+ fileWatcher : fileWatcher
512+ } ) ;
480513 return dgraph . load ( ) . then ( function ( ) {
481514 filesystem . root [ 'index.js' ] =
482515 filesystem . root [ 'index.js' ] . replace ( 'require("foo")' , '' ) ;
@@ -524,7 +557,10 @@ describe('DependencyGraph', function() {
524557 }
525558 } ) ;
526559
527- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
560+ var dgraph = new DependencyGraph ( {
561+ roots : [ root ] ,
562+ fileWatcher : fileWatcher
563+ } ) ;
528564 return dgraph . load ( ) . then ( function ( ) {
529565 delete filesystem . root . foo ;
530566 triggerFileChange ( 'delete' , 'foo.js' , root ) ;
@@ -571,7 +607,10 @@ describe('DependencyGraph', function() {
571607 }
572608 } ) ;
573609
574- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
610+ var dgraph = new DependencyGraph ( {
611+ roots : [ root ] ,
612+ fileWatcher : fileWatcher
613+ } ) ;
575614 return dgraph . load ( ) . then ( function ( ) {
576615 filesystem . root [ 'bar.js' ] = [
577616 '/**' ,
@@ -679,7 +718,7 @@ describe('DependencyGraph', function() {
679718
680719 pit ( 'should ignore directory updates' , function ( ) {
681720 var root = '/root' ;
682- var filesystem = fs . __setMockFilesystem ( {
721+ fs . __setMockFilesystem ( {
683722 'root' : {
684723 'index.js' : [
685724 '/**' ,
@@ -703,7 +742,10 @@ describe('DependencyGraph', function() {
703742 }
704743 }
705744 } ) ;
706- var dgraph = new DependencyGraph ( { roots : [ root ] , fileWatcher : fileWatcher } ) ;
745+ var dgraph = new DependencyGraph ( {
746+ roots : [ root ] ,
747+ fileWatcher : fileWatcher
748+ } ) ;
707749 return dgraph . load ( ) . then ( function ( ) {
708750 triggerFileChange ( 'change' , 'aPackage' , '/root' , {
709751 isDirectory : function ( ) { return true ; }
0 commit comments