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

Test suite does not run in browser. #41

Closed
legastero opened this issue Apr 10, 2014 · 2 comments
Closed

Test suite does not run in browser. #41

legastero opened this issue Apr 10, 2014 · 2 comments

Comments

@legastero
Copy link
Contributor

At the very least, the test suite is bailing in Testling with:

not ok 1 Error: Uncaught TypeError: Object #<Object> has no method 'pseudoRandomBytes' on line 7540

However, the test suite will not work as-is in the browser at all, because it is trying to compare the result of the crypto-browserify version in the repo against what require('crypto') pulls in. Which, after running the test suite through browserify, is actually just the previous (or even current!) version of crypto-browserify.

The test suite needs to precompile the results of all hashes and hmacs to a file that can be used for comparisons without relying on running node's crypto module during the tests. The sha.js module is doing that correctly.

@dominictarr
Copy link
Contributor

crypto-browserify is moving away from being an implementation to just bundling modules to get the same api as crypto. we should probably still have tests, but they can be much simpler, and maybe run the tests from the modules.

@dominictarr
Copy link
Contributor

okay this is fixed now.

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

No branches or pull requests

2 participants