diff --git a/packages/util/test/errors.test.ts b/packages/util/test/errors.test.ts index 4980b101ee1..6cb6273d326 100644 --- a/packages/util/test/errors.test.ts +++ b/packages/util/test/errors.test.ts @@ -89,8 +89,8 @@ describe('FirebaseError', () => { throw e; } catch (error) { assert.isDefined((error as Error).stack); - // Multi-line match trick - .* does not match \n - assert.match((error as Error).stack!, /FirebaseError[\s\S]/); + // Firefox no longer puts the error class name in the stack + // as of 139.0 so we don't have a string to match on. } }); diff --git a/scripts/run_tests_in_ci.js b/scripts/run_tests_in_ci.js index 0cf6a7f5d3c..7252b6acc3c 100644 --- a/scripts/run_tests_in_ci.js +++ b/scripts/run_tests_in_ci.js @@ -27,7 +27,9 @@ const crossBrowserPackages = { 'packages/auth': 'test:browser:unit', 'packages/auth-compat': 'test:browser:unit', 'packages/firestore': 'test:browser:unit', - 'packages/firestore-compat': 'test:browser' + 'packages/firestore-compat': 'test:browser', + 'packages/storage': 'test:browser:unit', + 'packages/storage-compat': 'test:browser:unit' }; function writeLogs(status, name, logText) { @@ -59,17 +61,27 @@ const argv = yargs.options({ const myPath = argv.d; let scriptName = argv.s; const dir = path.resolve(myPath); - const { name } = require(`${dir}/package.json`); + const { name, scripts } = require(`${dir}/package.json`); let testProcessOutput = ''; try { if (process.env?.BROWSERS) { + if (scripts['test:browser']) { + scriptName = 'test:browser'; + } for (const package in crossBrowserPackages) { if (dir.endsWith(package)) { scriptName = crossBrowserPackages[package]; } } } + + console.log( + `[${name}][${ + process.env.BROWSERS ?? 'chrome/node' + }]: Running script ${scriptName}` + ); + const testProcess = spawn('yarn', ['--cwd', dir, scriptName]); testProcess.childProcess.stdout.on('data', data => {