Skip to content

Loading…

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

Closed
ttaubert opened this Issue · 2 comments

2 participants

@ttaubert
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.

@malandrew

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.

@malandrew

@ttaubert Submitted pull request fixing this.

@isaacs isaacs added a commit that closed this issue
@isaacs isaacs Fix expose-gc test
It wasn't actually testing anything.

Close #79
Close #104
c312003
@isaacs isaacs closed this in c312003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.