Skip to content

test: make pipe test Windows-compatible

Rodrigo Muino Tomonari requested to merge github/fork/Trott/readfile into master

The existing test reads /dev/stdin instead of using a FIFO pipe created by Node.

  • You can't run the existing test on Windows because /dev/stdin does not exist on Windows.
  • Reading /dev/stdin with fs.readFile() seems to be a non-idiomatic approach to reading stdinwith a big dependency on non-universal OS behavior.
  • The test in this PR is easier to understand and easier to maintain.

(If this is met with general approval, there are two more tests that would get a similar overhaul in subsequent PRs.)

Merge request reports

Loading