@@ -2,7 +2,7 @@ import { parseArgv } from './parse'
22
33
44test ( 'deploymentEnv arg is parsed into same deploymentEnv string' , ( ) => {
5- const argv = [ , , 'production' ]
5+ const argv = [ '' , '' , 'production' ]
66
77 expect ( parseArgv ( argv ) ) . toMatchObject ( {
88 deploymentEnv : 'production'
@@ -11,7 +11,7 @@ test( 'deploymentEnv arg is parsed into same deploymentEnv string', () => {
1111
1212
1313test ( 'No ENV_VAR arg is parsed as null' , ( ) => {
14- const argv = [ , , 'production' ]
14+ const argv = [ '' , '' , 'production' ]
1515
1616 expect ( parseArgv ( argv ) ) . toMatchObject ( {
1717 varNameList : null
@@ -20,7 +20,7 @@ test( 'No ENV_VAR arg is parsed as null', () => {
2020
2121
2222test ( 'Single ENV_VAR arg is parsed into [string]' , ( ) => {
23- const argv = [ , , 'production' , 'API_KEY' ]
23+ const argv = [ '' , '' , 'production' , 'API_KEY' ]
2424
2525 expect ( parseArgv ( argv ) ) . toMatchObject ( {
2626 varNameList : [ 'API_KEY' ]
@@ -29,7 +29,7 @@ test( 'Single ENV_VAR arg is parsed into [string]', () => {
2929
3030
3131test ( 'Multiple ENV_VAR args are parsed into string[]' , ( ) => {
32- const argv = [ , , 'production' , 'API_KEY' , 'SECRET' , 'GRAPHQL_ENDPOINT' ]
32+ const argv = [ '' , '' , 'production' , 'API_KEY' , 'SECRET' , 'GRAPHQL_ENDPOINT' ]
3333
3434 expect ( parseArgv ( argv ) ) . toMatchObject ( {
3535 varNameList : [ 'API_KEY' , 'SECRET' , 'GRAPHQL_ENDPOINT' ]
@@ -38,7 +38,7 @@ test( 'Multiple ENV_VAR args are parsed into string[]', () => {
3838
3939
4040test ( 'Invalid arg shoud print help message to stdout' , ( ) => {
41- const argv = [ , , 'basilisk' ]
41+ const argv = [ '' , '' , 'basilisk' ]
4242
4343 jest . spyOn ( console , 'log' )
4444 // handle process.exit so test doesn't error
@@ -52,7 +52,7 @@ test( 'Invalid arg shoud print help message to stdout', () => {
5252
5353
5454test ( 'Invalid arg should exit process with code 9' , ( ) => {
55- const argv = [ , , 'basilisk' ]
55+ const argv = [ '' , '' , 'basilisk' ]
5656
5757 parseArgv ( argv )
5858
0 commit comments