File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/launcher/test/unit Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ describe('detect', () => {
69
69
vi . mocked ( linuxDetect ) . mockImplementation ( linuxDetectActual )
70
70
vi . mocked ( darwinDetect ) . mockImplementation ( darwinDetectActual )
71
71
vi . mocked ( windowsDetect ) . mockImplementation ( windowsDetectActual )
72
+
73
+ const { spawn } = await vi . importActual < typeof import ( 'child_process' ) > ( 'child_process' )
74
+
75
+ vi . mocked ( cp . spawn ) . mockImplementation ( spawn )
72
76
} )
73
77
74
78
// making simple to debug tests
@@ -98,7 +102,7 @@ describe('detect', () => {
98
102
describe ( '#getMajorVersion' , ( ) => {
99
103
it ( 'parses major version from provided string' , ( ) => {
100
104
expect ( getMajorVersion ( '123.45.67' ) ) . toEqual ( '123' )
101
- expect ( getMajorVersion ( 'Browser 77.1.0' ) ) . to . eq ( 'Browser 77' )
105
+ expect ( getMajorVersion ( 'Browser 77.1.0' ) ) . toEqual ( 'Browser 77' )
102
106
expect ( getMajorVersion ( '999' ) ) . toEqual ( '999' )
103
107
} )
104
108
} )
@@ -249,7 +253,7 @@ describe('detect', () => {
249
253
throw Error ( 'Should not find a browser' )
250
254
} )
251
255
. catch ( ( err ) => {
252
- expect ( err . notDetectedAtPath ) . to . be . true
256
+ expect ( err . notDetectedAtPath ) . toBe ( true )
253
257
} )
254
258
} )
255
259
You can’t perform that action at this time.
0 commit comments