Skip to content

test: stdin is not always a net.Socket

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with this change (including linting)?
  • Is the commit message formatted according to CONTRIBUTING.md?

Affected core subsystem(s)

test

Description of change

Refs: https://github.com/nodejs/node/pull/5916#issuecomment-202126418

<-ing a file into stdin actually results in a fs.ReadStream, rather an a tty.ReadStream, and as such does not inherit from net.Socket, unlike the other possible stdin options: https://github.com/nodejs/node/blob/293fd0453591ef0d87437a265ff515916d35d715/lib/internal/process/stdio.js#L54-L57

cc @trott I think this should cover the known issue.

Merge request reports

Loading