mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
More robust encrypt/decrypt test
This commit is contained in:
parent
da3420ac40
commit
d47d95cb6f
1 changed files with 4 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue