Skip to content

Commit a3fadb6

Browse files
committed
Fix test types
1 parent 48c90a0 commit a3fadb6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/helpers/parse.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { parseArgv } from './parse'
22

33

44
test( '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

1313
test( '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

2222
test( '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

3131
test( '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

4040
test( '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

5454
test( 'Invalid arg should exit process with code 9', () => {
55-
const argv = [,,'basilisk']
55+
const argv = ['','','basilisk']
5656

5757
parseArgv(argv)
5858

0 commit comments

Comments
 (0)