Kill crypto subprocess so tests actually finish running
This commit is contained in:
parent
5542d7b8db
commit
8e4d948172
4 changed files with 22 additions and 4 deletions
|
|
@ -210,5 +210,11 @@ module.exports = {
|
|||
authorizeDevice,
|
||||
generateRandomString,
|
||||
nodeKeyPairs,
|
||||
devicePublicKeys
|
||||
devicePublicKeys,
|
||||
/**
|
||||
* Used for tests.
|
||||
*/
|
||||
killECCCryptoSubprocess() {
|
||||
cryptoSubprocess.kill()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ const {
|
|||
decryptMessage,
|
||||
encryptMessage,
|
||||
generateKeyPair,
|
||||
isAuthorizedDevice
|
||||
isAuthorizedDevice,
|
||||
killECCCryptoSubprocess
|
||||
} = require('./ECC')
|
||||
|
||||
const uuid = () => {
|
||||
|
|
@ -118,4 +119,6 @@ describe('ECC', () => {
|
|||
expect(decrypted).toEqual(message)
|
||||
})
|
||||
})
|
||||
|
||||
after(killECCCryptoSubprocess)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -136,5 +136,11 @@ module.exports = {
|
|||
convertBufferToBase64,
|
||||
convertToEncryptedMessage,
|
||||
convertToEncryptedMessageResponse,
|
||||
processKey
|
||||
processKey,
|
||||
/**
|
||||
* Used for tests.
|
||||
*/
|
||||
killCryptoCryptoSubprocess() {
|
||||
cryptoSubprocess.kill()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ const expect = require('expect')
|
|||
const {
|
||||
generateRandomString,
|
||||
convertBase64ToBuffer,
|
||||
convertBufferToBase64
|
||||
convertBufferToBase64,
|
||||
killCryptoCryptoSubprocess
|
||||
} = require('./crypto')
|
||||
|
||||
describe('crypto', () => {
|
||||
|
|
@ -33,4 +34,6 @@ describe('crypto', () => {
|
|||
expect(asStringAgain).toEqual(rnd)
|
||||
})
|
||||
})
|
||||
|
||||
after(killCryptoCryptoSubprocess)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue