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/expose-gc-test.js doesn't actually test the child's output #79

Closed
ttaubert opened this issue May 18, 2013 · 2 comments
Closed

test/expose-gc-test.js doesn't actually test the child's output #79

ttaubert opened this issue May 18, 2013 · 2 comments

Comments

@ttaubert
Copy link
Contributor

t.ok("false", stdo)
// ... and ...
t.ok("true", stdo)

Those tests will always pass as they're just testing whether the strings "true" and "false" are truthy. I tried to fix the test using t.equal() and splitting stdo into separate lines but for some reason the child process didn't really produce the desired output.

Not sure what's going on and why I couldn't fix the test but I thought I'll file an issue so someone more familiar with the code can take a look at it.

@andrewdeandrade
Copy link
Contributor

Basically the problem here is that the intent of the test is to check if node gs-script.js produces the desired values. However, since this is going through the tap bin, the output is not the output of the node process, but the output of the tap process. Since the tap process ignores everything except TAP protocol lines (version, plan, ok, not ok, comments, etc.), the output of the child node process never makes it out.

What needs to be changed is that the gc-script.js needs to be a tap test file itself. Going to attempt to fix.

@andrewdeandrade
Copy link
Contributor

@ttaubert Submitted pull request fixing this.

@isaacs isaacs closed this as completed in c312003 Feb 12, 2015
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.

2 participants