tests: Add iostream test
tests: Use console.log when available