@@ -122,8 +122,6 @@ function sh(binary, args) {
122
122
}
123
123
}
124
124
125
- DEFAULT_JSC_LOCATION = "/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Helpers/jsc"
126
-
127
125
async function runTests ( ) {
128
126
const shellBinary = logGroup ( `Installing JavaScript Shell: ${ SHELL_NAME } ` , testSetup ) ;
129
127
runTest ( "Run Complete Suite" , ( ) => sh ( shellBinary , [ CLI_PATH ] ) ) ;
@@ -153,10 +151,17 @@ function jsvuOSName() {
153
151
return `${ osName ( ) } ${ osArch ( ) } `
154
152
}
155
153
154
+ DEFAULT_JSC_LOCATION = "/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Helpers/jsc"
155
+
156
156
function testSetup ( ) {
157
- const jsvuOS = "mac64arm" ;
158
- sh ( "jsvu" , [ `--engines=${ SHELL_NAME } ` , `--os=${ jsvuOSName ( ) } ` ] ) ;
159
- const shellBinary = path . join ( os . homedir ( ) , ".jsvu/bin" , SHELL_NAME ) ;
157
+ let shellBinary ;
158
+ try {
159
+ sh ( "jsvu" , [ `--engines=${ SHELL_NAME } ` , `--os=${ jsvuOSName ( ) } ` ] ) ;
160
+ shellBinary = path . join ( os . homedir ( ) , ".jsvu/bin" , SHELL_NAME ) ;
161
+ } catch {
162
+ if ( SHELL_NAME == "javascriptcore" )
163
+ shellBinary = DEFAULT_JSC_LOCATION
164
+ }
160
165
if ( ! fs . existsSync ( shellBinary ) )
161
166
throw new Error ( `Could not find shell binary: ${ shellBinary } ` ) ;
162
167
log ( `Installed JavaScript Shell: ${ shellBinary } ` ) ;
0 commit comments