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
- */ exports . __esModule = true ;
18
- var yargs = require ( 'yargs' ) ;
19
- var path_1 = require ( 'path' ) ;
20
- var child_process_promise_1 = require ( 'child-process-promise' ) ;
21
- var argv = yargs . options ( {
22
- main : { type : 'string' , demandOption : true } ,
23
- platform : { type : 'string' , default : 'node' } ,
24
- emulator : { type : 'boolean' } ,
25
- persistence : { type : 'boolean' }
26
- } ) . argv ;
27
- var nyc = path_1 . resolve ( __dirname , '../../../node_modules/.bin/nyc' ) ;
28
- var mocha = path_1 . resolve ( __dirname , '../../../node_modules/.bin/mocha' ) ;
29
- process . env . TS_NODE_CACHE = 'NO' ;
30
- process . env . TS_NODE_COMPILER_OPTIONS = '{"module":"commonjs"}' ;
31
- process . env . TEST_PLATFORM = argv . platform ;
32
- var args = [
33
- '--reporter' ,
34
- 'lcovonly' ,
35
- mocha ,
36
- '--require' ,
37
- 'ts-node/register' ,
38
- '--require' ,
39
- argv . main ,
40
- '--config' ,
41
- '../../config/mocharc.node.js'
42
- ] ;
43
- if ( argv . emulator ) {
44
- process . env . FIRESTORE_EMULATOR_PORT = '8080' ;
45
- process . env . FIRESTORE_EMULATOR_PROJECT_ID = 'test-emulator' ;
46
- }
47
- if ( argv . persistence ) {
48
- process . env . USE_MOCK_PERSISTENCE = 'YES' ;
49
- args . push ( '--require' , 'test/util/node_persistence.ts' ) ;
50
- }
51
- args = args . concat ( argv . _ ) ;
52
- var childProcess = child_process_promise_1 . spawn ( nyc , args , {
53
- stdio : 'inherit' ,
54
- cwd : process . cwd ( )
55
- } ) . childProcess ;
56
- process . once ( 'exit' , function ( ) {
57
- return childProcess . kill ( ) ;
58
- } ) ;
59
- process . once ( 'SIGINT' , function ( ) {
60
- return childProcess . kill ( 'SIGINT' ) ;
61
- } ) ;
62
- process . once ( 'SIGTERM' , function ( ) {
63
- return childProcess . kill ( 'SIGTERM' ) ;
64
- } ) ;
17
+ */ exports . __esModule = true ; var yargs = require ( "yargs" ) ; var path_1 = require ( "path" ) ; var child_process_promise_1 = require ( "child-process-promise" ) ; var argv = yargs . options ( { main :{ type :"string" , demandOption :true } , platform :{ type :"string" , default :"node" } , emulator :{ type :"boolean" } , persistence :{ 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_CACHE = "NO" ; process . env . TS_NODE_COMPILER_OPTIONS = '{"module":"commonjs"}' ; process . env . TEST_PLATFORM = argv . platform ; var args = [ "--reporter" , "lcovonly" , mocha , "--require" , "ts-node/register" , "--require" , argv . main , "--config" , "../../config/mocharc.node.js" ] ; if ( argv . emulator ) { process . env . FIRESTORE_EMULATOR_PORT = "8080" ; process . env . FIRESTORE_EMULATOR_PROJECT_ID = "test-emulator" } if ( argv . persistence ) { process . env . USE_MOCK_PERSISTENCE = "YES" ; args . push ( "--require" , "test/util/node_persistence.ts" ) } 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" ) } ) ) ;
0 commit comments