@@ -20,6 +20,7 @@ const DEFAULT_PATTERNS = [`**/?(*.)+(spec|test).?([cm])[jt]s?(x)`] // do not tru
2020const bundleOpts = { pure : true , bundle : true , esbuild : true , ts : 'auto' }
2121const bareboneOpts = { ...bundleOpts , barebone : true }
2222const hermesA = [ '-w' , '-Xmicrotask-queue' ] // -Xes6-class fails with -O0 / -Og, --block-scoping fails in default, any of that is bad
23+ const hermesS = [ ...hermesA , '-Xes6-block-scoping' ]
2324const denoA = [ 'run' , '--allow-all' ] // also will set DENO_COMPAT=1 env flag below
2425const denoT = [ 'test' , '--allow-all' ]
2526const nodeTS = process . features . typescript ? 'auto' : 'flag'
@@ -42,6 +43,7 @@ const ENGINES = new Map(
4243 'v8:bundle' : { binary : 'd8' , binaryArgs : [ '--expose-gc' ] , ...bareboneOpts } ,
4344 'jsc:bundle' : { binary : 'jsc' , target : 'safari13' , ...bareboneOpts } ,
4445 'hermes:bundle' : { binary : 'hermes' , binaryArgs : hermesA , target : 'es2018' , ...bareboneOpts } ,
46+ 'shermes:bundle' : { binary : 'shermes' , binaryArgs : hermesS , target : 'es2018' , ...bareboneOpts } ,
4547 'spidermonkey:bundle' : { binary : 'spidermonkey' , ...bareboneOpts } ,
4648 'engine262:bundle' : { binary : 'engine262' , ...bareboneOpts } ,
4749 'quickjs:bundle' : { binary : 'quickjs' , binaryArgs : [ '--std' ] , ...bareboneOpts } ,
@@ -62,7 +64,7 @@ const ENGINES = new Map(
6264 'msedge:playwright' : { binary : 'msedge' , browsers : 'playwright' , ...bundleOpts } ,
6365 } )
6466)
65- const barebonesOk = [ 'v8' , 'd8' , 'spidermonkey' , 'quickjs' , 'xs' , 'hermes' ]
67+ const barebonesOk = [ 'v8' , 'd8' , 'spidermonkey' , 'quickjs' , 'xs' , 'hermes' , 'shermes' ]
6668const barebonesUnhandled = [ 'jsc' , 'escargot' , 'boa' , 'graaljs' , 'jerry' , 'engine262' ]
6769
6870const getEnvFlag = ( name ) => {
@@ -282,7 +284,7 @@ Object.assign(options, engineOptions)
282284options . platform = options . binary // binary can be overriden by c8 or electron
283285const isBrowserLike = options . browsers || options . electron
284286setEnv ( 'EXODUS_TEST_ENGINE' , options . engine ) // e.g. 'hermes:bundle', 'node:bundle', 'node:test', 'node:pure'
285- setEnv ( 'EXODUS_TEST_PLATFORM' , options . binary ) // e.g. 'hermes', 'node'
287+ setEnv ( 'EXODUS_TEST_PLATFORM' , options . binary === 'shermes' ? 'hermes' : options . binary ) // e.g. 'hermes', 'node'
286288setEnv ( 'EXODUS_TEST_TIMEOUT' , options . testTimeout )
287289setEnv ( 'EXODUS_TEST_DEVTOOLS' , options . devtools ? '1' : '' )
288290setEnv ( 'EXODUS_TEST_IS_BROWSER' , isBrowserLike ? '1' : '' )
0 commit comments