File tree Expand file tree Collapse file tree
packages/angular/build/src/builders/unit-test/runners/vitest Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,7 +192,12 @@ export async function setupBrowserConfiguration(
192192 if ( instance . browser === 'chrome' || instance . browser === 'chromium' ) {
193193 instance . provider = providerFactory ( {
194194 capabilities : {
195- 'goog:chromeOptions' : { binary : executablePath } ,
195+ 'goog:chromeOptions' : {
196+ binary : executablePath ,
197+ args : executablePath . includes ( 'rules_browsers' )
198+ ? [ '--no-sandbox' , '--disable-dev-shm-usage' , '--disable-gpu' ]
199+ : undefined ,
200+ } ,
196201 } ,
197202 } ) ;
198203 }
Original file line number Diff line number Diff line change 11import { symlink } from 'node:fs/promises' ;
22import { resolve } from 'node:path' ;
3+ import { setTimeout } from 'node:timers/promises' ;
34import { appendToFile , expectFileToMatch , writeMultipleFiles } from '../../utils/fs' ;
45import { execAndWaitForOutputToMatch , waitForAnyProcessOutputToMatch } from '../../utils/process' ;
56import { updateJsonFile } from '../../utils/project' ;
@@ -10,11 +11,6 @@ const buildReadyRegEx = getGlobalVariable('argv')['esbuild']
1011 : / B u i l d a t : / ;
1112
1213export default async function ( ) {
13- // TODO: Disabled pending investigation. Steps work outside of test
14- if ( getGlobalVariable ( 'argv' ) [ 'esbuild' ] ) {
15- return ;
16- }
17-
1814 await updateJsonFile ( 'angular.json' , ( configJson ) => {
1915 configJson . projects [ 'test-project' ] . architect . build . options . preserveSymlinks = true ;
2016 } ) ;
@@ -32,10 +28,15 @@ export default async function () {
3228 buildReadyRegEx ,
3329 ) ;
3430
31+ await setTimeout ( 200 ) ;
32+
3533 // Trigger a rebuild
3634 await Promise . all ( [
3735 waitForAnyProcessOutputToMatch ( buildReadyRegEx ) ,
3836 appendToFile ( 'src/link-source.ts' , `\nconsole.log('foo-bar');` ) ,
3937 ] ) ;
40- await expectFileToMatch ( 'dist/test-project/browser/main.js' , `console.log('foo-bar')` ) ;
38+
39+ await setTimeout ( 200 ) ;
40+
41+ await expectFileToMatch ( 'dist/test-project/browser/main.js' , / c o n s o l e \. l o g \( [ " ' ] f o o - b a r [ " ' ] \) ; / ) ;
4142}
Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ import { writeFile } from '../../utils/fs';
55import { updateJsonFile } from '../../utils/project' ;
66
77export default async function ( ) : Promise < void > {
8- // TODO: investigate why this test hangs in CI but works locally.
9- return ;
10-
118 await applyVitestBuilder ( {
129 webdriver : true ,
1310 } ) ;
You can’t perform that action at this time.
0 commit comments