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

Is testdouble.js not compatible with PhantomJS? #154

Closed
bjarketrux opened this issue Nov 14, 2016 · 1 comment
Closed

Is testdouble.js not compatible with PhantomJS? #154

bjarketrux opened this issue Nov 14, 2016 · 1 comment

Comments

@bjarketrux
Copy link

Looks like Quibble uses an V8 specific API: testdouble/quibble#3
When running our tests on our CI testdouble fails with

phantomjs: TypeError: undefined is not an object (evaluating 'e.stack[0]')

Anything I can do to make the CI tests work in PhantomJS?
Thanks

@searls
Copy link
Member

searls commented Nov 14, 2016

Hey @bjarketrux -- td.replace for module paths does not work outside of Node.js, as Quibble doesn't just depend on v8, but also the internals of Node's native Module module.

Forgive me, because td.replace is indeed really confusing in how many types of arguments it can receive, resulting in very different behavior, but the simple way to think of it is that anything about CommonJS-ish modules is specific to Node.js until someone thinks up a better way to automatically rewire than what quibble does.

Here are the relevant docs for anyone just realizing this.

Separately, @bjarketrux, if you could find the exact snippet that resulted in this error, perhaps we could throw an error message about lack of support for the environment you're in--looks like whatever I'm doing to check that we're in a Node environment is insufficient.

@searls searls closed this as completed Nov 14, 2016
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