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', () => {
6969 vi . mocked ( linuxDetect ) . mockImplementation ( linuxDetectActual )
7070 vi . mocked ( darwinDetect ) . mockImplementation ( darwinDetectActual )
7171 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 )
7276 } )
7377
7478 // making simple to debug tests
@@ -98,7 +102,7 @@ describe('detect', () => {
98102 describe ( '#getMajorVersion' , ( ) => {
99103 it ( 'parses major version from provided string' , ( ) => {
100104 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' )
102106 expect ( getMajorVersion ( '999' ) ) . toEqual ( '999' )
103107 } )
104108 } )
@@ -249,7 +253,7 @@ describe('detect', () => {
249253 throw Error ( 'Should not find a browser' )
250254 } )
251255 . catch ( ( err ) => {
252- expect ( err . notDetectedAtPath ) . to . be . true
256+ expect ( err . notDetectedAtPath ) . toBe ( true )
253257 } )
254258 } )
255259
You can’t perform that action at this time.
0 commit comments