@@ -13,6 +13,7 @@ function deWindows(p) {
13
13
return p . replace ( / \\ / g, '/' ) ;
14
14
}
15
15
16
+ var cwd = deWindows ( process . cwd ( ) ) ;
16
17
var dir = deWindows ( __dirname ) ;
17
18
18
19
function suite ( moduleName ) {
@@ -357,18 +358,18 @@ function suite(moduleName) {
357
358
it ( 'emits all objects (unordered) when given multiple absolute paths and no cwd' , function ( done ) {
358
359
var expected = [
359
360
{
360
- cwd : process . cwd ( ) ,
361
+ cwd : cwd ,
361
362
base : dir + '/fixtures/whatsgoingon/hey/isaidhey/whatsgoingon' ,
362
363
path :
363
364
dir + '/fixtures/whatsgoingon/hey/isaidhey/whatsgoingon/test.txt' ,
364
365
} ,
365
366
{
366
- cwd : process . cwd ( ) ,
367
+ cwd : cwd ,
367
368
base : dir + '/fixtures' ,
368
369
path : dir + '/fixtures/test.coffee' ,
369
370
} ,
370
371
{
371
- cwd : process . cwd ( ) ,
372
+ cwd : cwd ,
372
373
base : dir + '/fixtures/whatsgoingon' ,
373
374
path : dir + '/fixtures/whatsgoingon/test.js' ,
374
375
} ,
@@ -527,7 +528,7 @@ function suite(moduleName) {
527
528
528
529
it ( 'works with direct paths and no cwd' , function ( done ) {
529
530
var expected = {
530
- cwd : process . cwd ( ) ,
531
+ cwd : cwd ,
531
532
base : dir + '/fixtures' ,
532
533
path : dir + '/fixtures/test.coffee' ,
533
534
} ;
@@ -545,21 +546,21 @@ function suite(moduleName) {
545
546
546
547
it ( 'works with a relative cwd' , function ( done ) {
547
548
var expected = {
548
- cwd : process . cwd ( ) + '/test' ,
549
+ cwd : cwd + '/test' ,
549
550
base : dir + '/fixtures' ,
550
551
path : dir + '/fixtures/test.coffee' ,
551
552
} ;
552
553
553
- var cwd = path . relative ( process . cwd ( ) , __dirname ) ;
554
-
555
554
function assert ( pathObjs ) {
556
555
expect ( pathObjs . length ) . toEqual ( 1 ) ;
557
556
expect ( pathObjs [ 0 ] ) . toEqual ( expected ) ;
558
557
}
559
558
560
559
stream . pipeline (
561
560
[
562
- globStream ( dir + '/fixtures/test.coffee' , { cwd : cwd } ) ,
561
+ globStream ( dir + '/fixtures/test.coffee' , {
562
+ cwd : path . relative ( process . cwd ( ) , __dirname ) ,
563
+ } ) ,
563
564
concat ( assert ) ,
564
565
] ,
565
566
done
@@ -568,7 +569,7 @@ function suite(moduleName) {
568
569
569
570
it ( 'supports negative globs' , function ( done ) {
570
571
var expected = {
571
- cwd : process . cwd ( ) ,
572
+ cwd : cwd ,
572
573
base : dir + '/fixtures/stuff' ,
573
574
path : dir + '/fixtures/stuff/run.dmc' ,
574
575
} ;
@@ -588,7 +589,7 @@ function suite(moduleName) {
588
589
589
590
it ( 'supports negative file paths' , function ( done ) {
590
591
var expected = {
591
- cwd : process . cwd ( ) ,
592
+ cwd : cwd ,
592
593
base : dir + '/fixtures/stuff' ,
593
594
path : dir + '/fixtures/stuff/run.dmc' ,
594
595
} ;
@@ -717,7 +718,7 @@ function suite(moduleName) {
717
718
718
719
it ( 'resolves absolute paths when root option is given' , function ( done ) {
719
720
var expected = {
720
- cwd : process . cwd ( ) ,
721
+ cwd : cwd ,
721
722
base : dir + '/fixtures' ,
722
723
path : dir + '/fixtures/test.coffee' ,
723
724
} ;
0 commit comments