mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-26 03:42:38 +00:00 
			
		
		
		
	 7cbf4b90e8
			
		
	
	
		7cbf4b90e8
		
	
	
	
	
		
			
			This allows us to load modules from scripts. This can be dangerous as it can load arbitrary files. Because of that it fails and throws by default. Currently, only js and JavaScriptTestRunner enable the default hook. This also adds tests to test-js which test module code. Because we form a spec perspective can't "enter" a module this is the easiest way to run tests without having to modify test-js to have special cases for modules. To specify modules in test-js we use the extension '.mjs' this is to ensure the files are not executed. We do still want to lint these files so the prettier scripts have changed to look for '.mjs' files as well.
		
			
				
	
	
		
			7 lines
		
	
	
	
		
			129 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
	
		
			129 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const value = "Well hello importer :^)";
 | |
| 
 | |
| export const defaultValue = value;
 | |
| 
 | |
| export default value;
 | |
| 
 | |
| export const passed = true;
 |