Use DI for stdin and stdout
Correct npm test script