mirror of
https://github.com/denoland/deno.git
synced 2024-11-05 09:04:41 -05:00
4c2380af5c
Adds two test files: "cli/tests/unit_node/process_test.ts" and "cli/tests/unit_node/child_process_test.ts" --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
11 lines
266 B
JavaScript
11 lines
266 B
JavaScript
const buffer = new Uint8Array(10);
|
|
const nread = await Deno.stdin.read(buffer);
|
|
|
|
if (nread != 10) {
|
|
throw new Error("Too little data read");
|
|
}
|
|
|
|
const nwritten = await Deno.stdout.write(buffer);
|
|
if (nwritten != 10) {
|
|
throw new Error("Too little data written");
|
|
}
|