diff options
Diffstat (limited to 'test/js/node/process/stdio-test-instance-a-lot.js')
-rw-r--r-- | test/js/node/process/stdio-test-instance-a-lot.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/js/node/process/stdio-test-instance-a-lot.js b/test/js/node/process/stdio-test-instance-a-lot.js new file mode 100644 index 000000000..71815ddea --- /dev/null +++ b/test/js/node/process/stdio-test-instance-a-lot.js @@ -0,0 +1,19 @@ +import { ArrayBufferSink } from "bun"; + +const sink = new ArrayBufferSink(); + +sink.write("hello"); +sink.write(" "); +sink.write("world"); +sink.write(new TextEncoder().encode("hello again|")); +sink.write(new TextEncoder().encode("😋 Get Emoji — All Emojis to ✂️ Copy and 📋 Paste 👌")); + +const string = Buffer.from(sink.end()).toString().repeat(9999); + +if (process.env.TEST_STDIO_STRING) { + const result = string; + process.stdout.write(result); +} else { + const result = Buffer.from(string); + process.stdout.write(result); +} |