Skip to content

Commit

Permalink
Merge pull request #228 from sasjs/quick-fix
Browse files Browse the repository at this point in the history
fix: update error message when webSourcePath is missing and streamConfig is true
  • Loading branch information
allanbowe authored Feb 20, 2023
2 parents f00f4d1 + 10e32e3 commit 350bef4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/types/targetValidators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ describe('validateStreamConfig', () => {
webSourcePath: ''
} as unknown as StreamConfig)
).toThrowError(
'Invalid stream config: `webSourcePath` cannot be empty, null or undefined.'
'Invalid stream config: `webSourcePath` should contain the path to your frontend application eg build, dist, or src.'
)
})

Expand All @@ -642,7 +642,7 @@ describe('validateStreamConfig', () => {
webSourcePath: null
} as unknown as StreamConfig)
).toThrowError(
'Invalid stream config: `webSourcePath` cannot be empty, null or undefined.'
'Invalid stream config: `webSourcePath` should contain the path to your frontend application eg build, dist, or src.'
)
})

Expand All @@ -654,7 +654,7 @@ describe('validateStreamConfig', () => {
webSourcePath: undefined
} as unknown as StreamConfig)
).toThrowError(
'Invalid stream config: `webSourcePath` cannot be empty, null or undefined.'
'Invalid stream config: `webSourcePath` should contain the path to your frontend application eg build, dist, or src.'
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/types/targetValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export const validateStreamConfig = (

if (streamConfig.streamWeb && !streamConfig.webSourcePath) {
throw new Error(
'Invalid stream config: `webSourcePath` cannot be empty, null or undefined.'
'Invalid stream config: `webSourcePath` should contain the path to your frontend application eg build, dist, or src.'
)
}

Expand Down

0 comments on commit 350bef4

Please sign in to comment.