@@ -27,7 +27,9 @@ const crossBrowserPackages = {
27
27
'packages/auth' : 'test:browser:unit' ,
28
28
'packages/auth-compat' : 'test:browser:unit' ,
29
29
'packages/firestore' : 'test:browser:unit' ,
30
- 'packages/firestore-compat' : 'test:browser'
30
+ 'packages/firestore-compat' : 'test:browser' ,
31
+ 'packages/storage' : 'test:browser:unit' ,
32
+ 'packages/storage-compat' : 'test:browser:unit'
31
33
} ;
32
34
33
35
function writeLogs ( status , name , logText ) {
@@ -59,17 +61,27 @@ const argv = yargs.options({
59
61
const myPath = argv . d ;
60
62
let scriptName = argv . s ;
61
63
const dir = path . resolve ( myPath ) ;
62
- const { name } = require ( `${ dir } /package.json` ) ;
64
+ const { name, scripts } = require ( `${ dir } /package.json` ) ;
63
65
64
66
let testProcessOutput = '' ;
65
67
try {
66
68
if ( process . env ?. BROWSERS ) {
69
+ if ( scripts [ 'test:browser' ] ) {
70
+ scriptName = 'test:browser' ;
71
+ }
67
72
for ( const package in crossBrowserPackages ) {
68
73
if ( dir . endsWith ( package ) ) {
69
74
scriptName = crossBrowserPackages [ package ] ;
70
75
}
71
76
}
72
77
}
78
+
79
+ console . log (
80
+ `[${ name } ][${
81
+ process . env . BROWSERS ?? 'chrome/node'
82
+ } ]: Running script ${ scriptName } `
83
+ ) ;
84
+
73
85
const testProcess = spawn ( 'yarn' , [ '--cwd' , dir , scriptName ] ) ;
74
86
75
87
testProcess . childProcess . stdout . on ( 'data' , data => {
0 commit comments