1
- " use strict" ;
1
+ ' use strict' ;
2
2
/**
3
3
* @license
4
4
* Copyright 2020 Google LLC
14
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
* See the License for the specific language governing permissions and
16
16
* limitations under the License.
17
- */ var __spreadArrays = this && this . __spreadArrays || function ( ) { for ( var s = 0 , i = 0 , il = arguments . length ; i < il ; i ++ ) s += arguments [ i ] . length ; for ( var r = Array ( s ) , k = 0 , i = 0 ; i < il ; i ++ ) for ( var a = arguments [ i ] , j = 0 , jl = a . length ; j < jl ; j ++ , k ++ ) r [ k ] = a [ j ] ; return r } ; exports . __esModule = true ; var path_1 = require ( "path" ) ; var child_process_promise_1 = require ( "child-process-promise" ) ; var yargs = require ( "yargs" ) ; var argv = yargs . options ( { local :{ type :"boolean" } , integration :{ type :"boolean" } } ) . argv ; var nyc = path_1 . resolve ( __dirname , "../../../node_modules/.bin/nyc" ) ; var mocha = path_1 . resolve ( __dirname , "../../../node_modules/.bin/mocha" ) ; process . env . TS_NODE_COMPILER_OPTIONS = '{"module":"commonjs"}' ; var testConfig = [ "src/!(platform_browser|platform_react_native|platform_cordova)/**/*.test.ts" , "--file" , "index.node.ts" ] ; if ( argv . integration ) { testConfig = [ "test/integration/flows/{email,anonymous}.test.ts" ] ; if ( argv . local ) { testConfig . push ( "test/integration/flows/*.local.test.ts" ) } } var args = __spreadArrays ( [ "--reporter" , "lcovonly" , mocha ] , testConfig , [ "--config" , "../../config/mocharc.node.js" ] ) ; if ( argv . local ) { process . env . AUTH_EMULATOR_PORT = "9099" ; process . env . AUTH_EMULATOR_PROJECT_ID = "test-emulator" } args = args . concat ( argv . _ ) ; var childProcess = child_process_promise_1 . spawn ( nyc , args , { stdio :"inherit" , cwd :process . cwd ( ) } ) . childProcess ; process . once ( "exit" , ( function ( ) { return childProcess . kill ( ) } ) ) ; process . once ( "SIGINT" , ( function ( ) { return childProcess . kill ( "SIGINT" ) } ) ) ; process . once ( "SIGTERM" , ( function ( ) { return childProcess . kill ( "SIGTERM" ) } ) ) ;
17
+ */ var __spreadArrays =
18
+ ( this && this . __spreadArrays ) ||
19
+ function ( ) {
20
+ for ( var s = 0 , i = 0 , il = arguments . length ; i < il ; i ++ )
21
+ s += arguments [ i ] . length ;
22
+ for ( var r = Array ( s ) , k = 0 , i = 0 ; i < il ; i ++ )
23
+ for ( var a = arguments [ i ] , j = 0 , jl = a . length ; j < jl ; j ++ , k ++ )
24
+ r [ k ] = a [ j ] ;
25
+ return r ;
26
+ } ;
27
+ exports . __esModule = true ;
28
+ var path_1 = require ( 'path' ) ;
29
+ var child_process_promise_1 = require ( 'child-process-promise' ) ;
30
+ var yargs = require ( 'yargs' ) ;
31
+ var argv = yargs . options ( {
32
+ local : { type : 'boolean' } ,
33
+ integration : { type : 'boolean' }
34
+ } ) . argv ;
35
+ var nyc = path_1 . resolve ( __dirname , '../../../node_modules/.bin/nyc' ) ;
36
+ var mocha = path_1 . resolve ( __dirname , '../../../node_modules/.bin/mocha' ) ;
37
+ process . env . TS_NODE_COMPILER_OPTIONS = '{"module":"commonjs"}' ;
38
+ var testConfig = [
39
+ 'src/!(platform_browser|platform_react_native|platform_cordova)/**/*.test.ts' ,
40
+ '--file' ,
41
+ 'index.node.ts'
42
+ ] ;
43
+ if ( argv . integration ) {
44
+ testConfig = [ 'test/integration/flows/{email,anonymous}.test.ts' ] ;
45
+ if ( argv . local ) {
46
+ testConfig . push ( 'test/integration/flows/*.local.test.ts' ) ;
47
+ }
48
+ }
49
+ var args = __spreadArrays ( [ '--reporter' , 'lcovonly' , mocha ] , testConfig , [
50
+ '--config' ,
51
+ '../../config/mocharc.node.js'
52
+ ] ) ;
53
+ if ( argv . local ) {
54
+ process . env . AUTH_EMULATOR_PORT = '9099' ;
55
+ process . env . AUTH_EMULATOR_PROJECT_ID = 'test-emulator' ;
56
+ }
57
+ args = args . concat ( argv . _ ) ;
58
+ var childProcess = child_process_promise_1 . spawn ( nyc , args , {
59
+ stdio : 'inherit' ,
60
+ cwd : process . cwd ( )
61
+ } ) . childProcess ;
62
+ process . once ( 'exit' , function ( ) {
63
+ return childProcess . kill ( ) ;
64
+ } ) ;
65
+ process . once ( 'SIGINT' , function ( ) {
66
+ return childProcess . kill ( 'SIGINT' ) ;
67
+ } ) ;
68
+ process . once ( 'SIGTERM' , function ( ) {
69
+ return childProcess . kill ( 'SIGTERM' ) ;
70
+ } ) ;
0 commit comments