@@ -39,22 +39,22 @@ describe('Binary Control Operations', () => {
39
39
const platformAndBinary = [
40
40
{
41
41
binary : BINARY_LINKS . DARWIN ,
42
- folder : [ ' /work' , ' binary' , LOCAL_BINARY_FOLDER , ' darwin' ] ,
42
+ folder : ` /work/ binary/ ${ LOCAL_BINARY_FOLDER } / darwin` ,
43
43
arch : 'x64' ,
44
44
platform : PLATFORMS . DARWIN ,
45
45
} , {
46
46
binary : BINARY_LINKS . LINUX_32 ,
47
- folder : [ ' /work' , ' binary' , LOCAL_BINARY_FOLDER , ' linux' ] ,
47
+ folder : ` /work/ binary/ ${ LOCAL_BINARY_FOLDER } / linux` ,
48
48
arch : 'x32' ,
49
49
platform : PLATFORMS . LINUX ,
50
50
} , {
51
51
binary : BINARY_LINKS . LINUX_64 ,
52
- folder : [ ' /work' , ' binary' , LOCAL_BINARY_FOLDER , ' linux' ] ,
52
+ folder : ` /work/ binary/ ${ LOCAL_BINARY_FOLDER } / linux` ,
53
53
arch : 'x64' ,
54
54
platform : PLATFORMS . LINUX ,
55
55
} , {
56
56
binary : BINARY_LINKS . WINDOWS ,
57
- folder : [ ' /work' , ' binary' , LOCAL_BINARY_FOLDER , ' win32' ] ,
57
+ folder : ` /work/ binary/ ${ LOCAL_BINARY_FOLDER } / win32` ,
58
58
arch : 'x32' ,
59
59
platform : PLATFORMS . WIN32 ,
60
60
} ,
@@ -64,11 +64,13 @@ describe('Binary Control Operations', () => {
64
64
it ( `decides the binary and the folder based on the platform and architecture for ${ system . platform } - ${ system . arch } ` , ( ) => {
65
65
sinon . stub ( os , 'platform' ) . returns ( system . platform ) ;
66
66
sinon . stub ( os , 'arch' ) . returns ( system . arch ) ;
67
+ sinon . stub ( path , 'resolve' ) . returns ( system . folder ) ;
67
68
const binaryControl = new BinaryControl ( ) ;
68
69
expect ( binaryControl . binaryLink ) . to . eql ( system . binary ) ;
69
- expect ( binaryControl . binaryFolder ) . to . include ( path . resolve ( ... system . folder ) ) ;
70
+ expect ( binaryControl . binaryFolder ) . to . eq ( system . folder ) ;
70
71
os . platform . restore ( ) ;
71
72
os . arch . restore ( ) ;
73
+ path . resolve . restore ( ) ;
72
74
} ) ;
73
75
} ) ;
74
76
0 commit comments