11'use strict' ;
2- // Comment the next two lines if you want to run with Chrome instead of Chromium
3- const puppeteer = require ( 'puppeteer' ) ;
4- process . env . CHROME_BIN = puppeteer . executablePath ( ) ;
2+ // Use CHROME_BIN env var if set (e.g., in CI), otherwise fall back to Puppeteer's bundled Chromium
3+ if ( ! process . env . CHROME_BIN ) {
4+ const puppeteer = require ( 'puppeteer' ) ;
5+ process . env . CHROME_BIN = puppeteer . executablePath ( ) ;
6+ }
57
68const NodePolyfillPlugin = require ( 'node-polyfill-webpack-plugin' ) ;
79
@@ -18,8 +20,7 @@ module.exports = {
1820 customLaunchers : {
1921 ChromeHeadlessNoSandbox : {
2022 base : 'ChromeHeadless' ,
21- // Flags required to run in ubuntu-22.04 or above (https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md)
22- flags : [ '--no-sandbox' , '--disable-setuid-sandbox' ]
23+ flags : [ '--no-sandbox' , '--disable-setuid-sandbox' , '--headless=new' ]
2324 }
2425 } ,
2526 browsers : [ 'ChromeHeadlessNoSandbox' ] ,
@@ -29,21 +30,7 @@ module.exports = {
2930 // Uncomment to run a particular UT:
3031 // '**/listeners/__tests__/browser.spec.js',
3132 // Run browser UTs. Commons and Node UTs run with `test-node` npm script
32- '*/**/__tests__/**/browser.spec.js' ,
33- {
34- pattern : 'engine/__tests__/engine/mocks/murmur3*.csv' ,
35- watched : false ,
36- included : false ,
37- served : true ,
38- nocache : true
39- } ,
40- {
41- pattern : 'engine/__tests__/matchers/mocks/regex.txt' ,
42- watched : false ,
43- included : false ,
44- served : true ,
45- nocache : true
46- }
33+ '*/**/__tests__/**/browser.spec.js'
4734 ] ,
4835
4936 // list of files / patterns to exclude
0 commit comments