cryptr
cryptr copied to clipboard
Jest detect open handles
run with:
$ npx jest --detectOpenHandles
PASS __tests__/test.js
✓ works... (121 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.345 s, estimated 1 s
Ran all test suites.
Jest has detected the following 2 open handles potentially keeping Jest from exiting:
● PBKDF2REQUEST
14 |
15 | function getKey(salt) {
> 16 | return crypto.pbkdf2Sync(secret, salt, 100000, 32, 'sha512');
| ^
17 | }
18 |
19 | this.encrypt = function encrypt(value) {
at pbkdf2Sync (index.js:16:23)
at Cryptr.getKey [as encrypt] (index.js:27:21)
at Object.encrypt (__tests__/test.js:8:30)
● PBKDF2REQUEST
14 |
15 | function getKey(salt) {
> 16 | return crypto.pbkdf2Sync(secret, salt, 100000, 32, 'sha512');
| ^
17 | }
18 |
19 | this.encrypt = function encrypt(value) {
at pbkdf2Sync (index.js:16:23)
at Cryptr.getKey [as decrypt] (index.js:49:21)
at Object.decrypt (__tests__/test.js:9:30)
I understand the jest don't finish correctly because something it's maintained open.
Note:** this PR is not a fix, only reproduces the problem.