refactor(MockSTDIN): defineProperty() rather than assignment
refactor(MockSTDIN): use braces for conditional statements