[BUG #8186] move stdout test into own script
update jsdoc comment
[BUG #8186] improve testability
[BUG #8186] add a bunch of tests
switch to single quotes (%s/"/'/g)