Skip to content

Commit

Permalink
test: simplify and improve validation test for custom secret
Browse files Browse the repository at this point in the history
Signed-off-by: ernolf <[email protected]>
  • Loading branch information
ernolf committed Aug 26, 2024
1 parent af65887 commit b980023
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/tests/components/SetupConfirmation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ describe('SetupConfirmation', () => {
*/
})


Check failure on line 191 in src/tests/components/SetupConfirmation.spec.js

View workflow job for this annotation

GitHub Actions / NPM lint

More than 1 blank line not allowed
it('validates custom secret', () => {
const wrapper = shallowMount(SetupConfirmation, {
store,
Expand All @@ -200,13 +201,8 @@ describe('SetupConfirmation', () => {
})
wrapper.setData({ customSecret: 'INVALID!' })
wrapper.vm.validateCustomSecret()
if (wrapper.vm.customSecretWarning !== true) {
throw new Error('customSecretWarning should be true')
}
wrapper.setData({ customSecret: 'VALID2' })
wrapper.vm.validateCustomSecret()
if (wrapper.vm.customSecretWarning !== false) {
throw new Error('customSecretWarning should be false')
if (wrapper.vm.customSecretWarning == false) {

Check failure on line 204 in src/tests/components/SetupConfirmation.spec.js

View workflow job for this annotation

GitHub Actions / NPM lint

Expected '===' and instead saw '=='
throw new Error('customSecretWarning should not be false')
}
})
})

0 comments on commit b980023

Please sign in to comment.