Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: expected [Error] to match /^Error #131

Open
gperciva opened this issue Jun 30, 2016 · 5 comments · May be fixed by jkantr/node-scrypt#1
Open

AssertionError: expected [Error] to match /^Error #131

gperciva opened this issue Jun 30, 2016 · 5 comments · May be fixed by jkantr/node-scrypt#1

Comments

@gperciva
Copy link

Fresh install on Ubuntu 16.04 (inside virtualbox). I'm guessing it's a simple regex typo?

  71 passing (1s)
  2 failing

  1) Scrypt Node Module Tests Scrypt Hash Function Verify Hash Synchronous functionality with incorrect arguments Will throw an Error if KDF buffer is not a valid scrypt-encrypted block:
     AssertionError: expected [Error] to match /^Error: data is not a valid scrypt-encrypted block$/
      at Context.<anonymous> (tests/scrypt-tests.js:493:17)

  2) Scrypt Node Module Tests Scrypt Hash Function Verify Hash Asynchronous functionality with incorrect arguments Will throw an Error if KDF buffer is not a valid scrypt-encrypted block:
     AssertionError: expected [Error] to match /^Error: data is not a valid scrypt-encrypted block$/
      at Context.<anonymous> (tests/scrypt-tests.js:558:17)
@BrandonZacharie
Copy link

BrandonZacharie commented Jul 2, 2016

I'm able to replicate that. I'll take a deeper look this weekend.
screen shot 2016-07-01 at 18 56 29

@BrandonZacharie
Copy link

The regular expressions in those two tests are not much different than in any of the other tests. It appears that the string representations of the error objects produced in those two tests are the culprits; In fact, I get different output on every run.

screen shot 2016-07-05 at 09 43 45
screen shot 2016-07-05 at 09 42 44

I suspect there's something different in how those errors are constructed and/or handled/stringified.

@barrysteyn
Copy link
Owner

Hi

I am sorry, I am in the middle of getting married :) I will be back home on the 10th of Jul and then give me some time to settle down and I will sort this out. Apologies for lack of response, but wedding stuff takes quite a lot of time.

@gperciva
Copy link
Author

gperciva commented Jul 8, 2016

Congratulations! No rush; I just happened to notice it while investigating #123.

@barrysteyn
Copy link
Owner

Sorry for the delay. I will look into this on Sat. Again, apologies.

jkantr added a commit to jkantr/node-scrypt that referenced this issue Feb 13, 2020
Also fix barrysteyn#131 while we're in there... so the tests confirm to pass
DO NOT MERGE WITHOUT FIXING COPYRIGHT NOTICE
@jkantr jkantr linked a pull request Feb 13, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants