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
importing tape causes crash when used in plv8 (a postgres js interpreter that uses v8) #413
Comments
This is a node lib; I'm not sure what plv8 is, but this library in no way is intended to support it. What's the use case for running tests in it, if it doesn't provide the ability to launch child processes? |
plv8 allows writing stored procedures in javascript that run inside a postgres database.
Not sure I understand the question, plv8 does not allow launching child processes in order to restrict what a stored proc can do on the db server. The use case for running tests in pl8v is... to test the code that runs in plv8 ! I was under the impression that tape could run in a browser, from reading these issues it appears it doesn't :
The proposal suggested here : #88 seems like a nice way to separate the tape api from the node env, with the added benefits mentioned by the author. |
Yes, using browserify is how it's used in a browser; if you browserify |
running with browserify solved the crash, now I get another crash at this line : https://github.com/substack/tape/blob/master/lib/test.js#L18 since plv8 doesn't have a setTimeout method. I tried setting the variable to null, or do a do nothing function, when I do what, it crashes later on here:
This code appears in my browserified bundle, not sure where it is from, I suppose it's a shim to emulate a browser env, the problem is that I'm not in a browser, nor am I in a Node env ! |
Since tape is async by default, if you don't have |
https://github.com/plv8/plv8
this single line :
causes the following exception:
note that plv8 is not a node environement, it cannot spawn child processes among other things,
it seems that tape is indirectly doing this.
I wanted to create my own test stream with :
to avoid using console.log or other things not available in plv8, but it seems
as if tape is using unavailable libs in it's initialization.
The text was updated successfully, but these errors were encountered: