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,
|
authorizeDevice,
|
||||||
generateRandomString,
|
generateRandomString,
|
||||||
nodeKeyPairs,
|
nodeKeyPairs,
|
||||||
devicePublicKeys
|
devicePublicKeys,
|
||||||
|
/**
|
||||||
|
* Used for tests.
|
||||||
|
*/
|
||||||
|
killECCCryptoSubprocess() {
|
||||||
|
cryptoSubprocess.kill()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ const {
|
||||||
decryptMessage,
|
decryptMessage,
|
||||||
encryptMessage,
|
encryptMessage,
|
||||||
generateKeyPair,
|
generateKeyPair,
|
||||||
isAuthorizedDevice
|
isAuthorizedDevice,
|
||||||
|
killECCCryptoSubprocess
|
||||||
} = require('./ECC')
|
} = require('./ECC')
|
||||||
|
|
||||||
const uuid = () => {
|
const uuid = () => {
|
||||||
|
|
@ -118,4 +119,6 @@ describe('ECC', () => {
|
||||||
expect(decrypted).toEqual(message)
|
expect(decrypted).toEqual(message)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
after(killECCCryptoSubprocess)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -136,5 +136,11 @@ module.exports = {
|
||||||
convertBufferToBase64,
|
convertBufferToBase64,
|
||||||
convertToEncryptedMessage,
|
convertToEncryptedMessage,
|
||||||
convertToEncryptedMessageResponse,
|
convertToEncryptedMessageResponse,
|
||||||
processKey
|
processKey,
|
||||||
|
/**
|
||||||
|
* Used for tests.
|
||||||
|
*/
|
||||||
|
killCryptoCryptoSubprocess() {
|
||||||
|
cryptoSubprocess.kill()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@ const expect = require('expect')
|
||||||
const {
|
const {
|
||||||
generateRandomString,
|
generateRandomString,
|
||||||
convertBase64ToBuffer,
|
convertBase64ToBuffer,
|
||||||
convertBufferToBase64
|
convertBufferToBase64,
|
||||||
|
killCryptoCryptoSubprocess
|
||||||
} = require('./crypto')
|
} = require('./crypto')
|
||||||
|
|
||||||
describe('crypto', () => {
|
describe('crypto', () => {
|
||||||
|
|
@ -33,4 +34,6 @@ describe('crypto', () => {
|
||||||
expect(asStringAgain).toEqual(rnd)
|
expect(asStringAgain).toEqual(rnd)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
after(killCryptoCryptoSubprocess)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue