Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit e39d252

Browse files
committed
#8 add test case for lstat and stat
1 parent 981018e commit e39d252

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test/test-fs.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,27 @@ describe('stat and lstat test', (report, done) => {
396396
return fs.stat(file)
397397
})
398398
.then((stat) => {
399-
console.log(stat)
400399
report(
401400
<Assert key="should have properties"
402401
expect={['size', 'type', 'lastModified', 'filename', 'path']}
403402
comparer={Comparer.hasProperties}
404403
actual={stat}/>)
404+
return fs.stat('13123132')
405+
})
406+
.then(()=>{})
407+
.catch((err) => {
408+
console.log(err)
409+
report(<Assert key="stat error catacable"
410+
expect={true}
411+
actual={true}/>)
412+
done()
413+
})
414+
.then(()=>{})
415+
.catch((err) => {
416+
console.log(err)
417+
report(<Assert key="lstat error catacable"
418+
expect={true}
419+
actual={true}/>)
405420
done()
406421
})
407422

0 commit comments

Comments
 (0)