Add spec for accessing process.stdin

This commit is contained in:
Kevin Sawicki 2016-09-07 14:40:18 -07:00
parent 691aec701f
commit b5e9bb9e6a

View file

@ -221,12 +221,16 @@ describe('node feature', function () {
})
describe('process.stdout', function () {
it('should not throw exception', function () {
process.stdout
it('does not throw an exception when accessed', function () {
assert.doesNotThrow(function () {
process.stdout
})
})
it('should not throw exception when calling write()', function () {
process.stdout.write('test')
it('does not throw an exception when calling write()', function () {
assert.doesNotThrow(function () {
process.stdout.write('test')
})
})
it('should have isTTY defined', function () {
@ -236,6 +240,20 @@ describe('node feature', function () {
})
})
describe('process.stdin', function () {
it('does not throw an exception when accessed', function () {
assert.doesNotThrow(function () {
process.stdin
})
})
it('does not throw an exception when calling read()', function () {
assert.doesNotThrow(function () {
assert.equal(process.stdin.read(), null)
})
})
})
describe('process.version', function () {
it('should not have -pre', function () {
assert(!process.version.endsWith('-pre'))