This commit updates the necessary config files to run the angular.io and docs tooling unit tests in random order (and fixes the tests that were failing due to their dependence on the previous ordered execution). Besides being a good idea anyway, running tests in random order is the new [default behavior in jasmine@3.0.0][1], so this commit is in preparation of upgrading jasmine to the latest version. [1]: https://github.com/jasmine/jasmine/blob/v3.0.0/release_notes/3.0.md#breaking-changes PR Close #31527
		
			
				
	
	
		
			18 lines
		
	
	
		
			657 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			657 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /*
 | |
|  * Use this script to run the tests for the doc generation
 | |
|  * We cannot use the Jasmine CLI directly because it doesn't seem to
 | |
|  * understand the glob and only runs one spec file.
 | |
|  *
 | |
|  * Equally we cannot use a jasmine.json config file because it doesn't
 | |
|  * allow us to set the projectBaseDir, which means that you have to run
 | |
|  * jasmine CLI from this directory.
 | |
|  *
 | |
|  * Using a file like this gives us full control and keeps the package.json
 | |
|  * file clean and simple.
 | |
|  */
 | |
| 
 | |
| const Jasmine = require('jasmine');
 | |
| const jasmine = new Jasmine({ projectBaseDir: __dirname });
 | |
| jasmine.loadConfig({ random: true, spec_files: ['**/*.spec.js'] });
 | |
| jasmine.execute();
 |