Skip to content

Commit

Permalink
Fix test types
Browse files Browse the repository at this point in the history
  • Loading branch information
Pytal committed Nov 4, 2020
1 parent 48c90a0 commit a3fadb6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/helpers/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { parseArgv } from './parse'


test( 'deploymentEnv arg is parsed into same deploymentEnv string', () => {
const argv = [,,'production']
const argv = ['','','production']

expect(parseArgv(argv)).toMatchObject({
deploymentEnv: 'production'
Expand All @@ -11,7 +11,7 @@ test( 'deploymentEnv arg is parsed into same deploymentEnv string', () => {


test( 'No ENV_VAR arg is parsed as null', () => {
const argv = [,,'production']
const argv = ['','','production']

expect(parseArgv(argv)).toMatchObject({
varNameList: null
Expand All @@ -20,7 +20,7 @@ test( 'No ENV_VAR arg is parsed as null', () => {


test( 'Single ENV_VAR arg is parsed into [string]', () => {
const argv = [,,'production','API_KEY']
const argv = ['','','production','API_KEY']

expect(parseArgv(argv)).toMatchObject({
varNameList: ['API_KEY']
Expand All @@ -29,7 +29,7 @@ test( 'Single ENV_VAR arg is parsed into [string]', () => {


test( 'Multiple ENV_VAR args are parsed into string[]', () => {
const argv = [,,'production','API_KEY','SECRET','GRAPHQL_ENDPOINT']
const argv = ['','','production','API_KEY','SECRET','GRAPHQL_ENDPOINT']

expect(parseArgv(argv)).toMatchObject({
varNameList: ['API_KEY','SECRET','GRAPHQL_ENDPOINT']
Expand All @@ -38,7 +38,7 @@ test( 'Multiple ENV_VAR args are parsed into string[]', () => {


test( 'Invalid arg shoud print help message to stdout', () => {
const argv = [,,'basilisk']
const argv = ['','','basilisk']

jest.spyOn(console, 'log')
// handle process.exit so test doesn't error
Expand All @@ -52,7 +52,7 @@ test( 'Invalid arg shoud print help message to stdout', () => {


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

parseArgv(argv)

Expand Down

0 comments on commit a3fadb6

Please sign in to comment.