Add spec for accessing process.stdin
This commit is contained in:
parent
691aec701f
commit
b5e9bb9e6a
1 changed files with 22 additions and 4 deletions
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue