@@ -8675,10 +8675,10 @@ def test(assert_returncode=0):
86758675 js = read_file (self .output_name ('test_hello_world' ))
86768676 assert ('require(' in js ) == ('node' in self .get_setting ('ENVIRONMENT' )), 'we should have require() calls only if node js specified'
86778677
8678- for engine in config . JS_ENGINES :
8678+ for engine in self . js_engines :
86798679 print (f'engine: { engine } ' )
86808680 # set us to test in just this engine
8681- self .require_engine (engine )
8681+ self .require_engine (engine , force = True )
86828682 # tell the compiler to build with just that engine
86838683 if engine_is_node (engine ):
86848684 right = 'node'
@@ -8688,19 +8688,19 @@ def test(assert_returncode=0):
86888688 wrong = 'node'
86898689 # test with the right env
86908690 self .set_setting ('ENVIRONMENT' , right )
8691- print ('ENVIRONMENT =' , self .get_setting ('ENVIRONMENT' ))
8691+ print ('right ENVIRONMENT =' , self .get_setting ('ENVIRONMENT' ))
86928692 test ()
86938693 # test with the wrong env
86948694 self .set_setting ('ENVIRONMENT' , wrong )
8695- print ('ENVIRONMENT =' , self .get_setting ('ENVIRONMENT' ))
8695+ print ('wrong ENVIRONMENT =' , self .get_setting ('ENVIRONMENT' ))
86968696 try :
86978697 test (assert_returncode = NON_ZERO )
86988698 raise Exception ('unexpected success' )
86998699 except Exception as e :
8700- self .assertContained (' not compiled for this environment' , str (e ))
8700+ self .assertContained ([ 'environment detected but not enabled at build time' , 'not compiled for this environment'] , str (e ))
87018701 # test with a combined env
87028702 self .set_setting ('ENVIRONMENT' , right + ',' + wrong )
8703- print ('ENVIRONMENT =' , self .get_setting ('ENVIRONMENT' ))
8703+ print ('both ENVIRONMENT =' , self .get_setting ('ENVIRONMENT' ))
87048704 test ()
87058705
87068706 @requires_node
0 commit comments