Tests: fixed typo in stream_js.t introduced in fd7766ab0a69. In addition, tests were added to catch proper exit status.