Mock STDIN file descriptor in Node.js