mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
More robust encrypt/decrypt test
This commit is contained in:
parent
da3420ac40
commit
d47d95cb6f
@ -20,14 +20,12 @@ describe('Encrypt/Descrypt', function () {
|
|||||||
|
|
||||||
const encrypted = await encrypt(str, 'my_secret')
|
const encrypted = await encrypt(str, 'my_secret')
|
||||||
|
|
||||||
let error = false
|
let decrypted = ''
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await decrypt(encrypted, 'my_sicret')
|
decrypted = await decrypt(encrypted, 'my_sicret')
|
||||||
} catch (err) {
|
} catch { }
|
||||||
error = true
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(error).to.be.true
|
expect(decrypted).to.not.equal(encrypted)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user