Skip to content

Commit

Permalink
Add async test of stat uid & gid
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher J. Brody committed May 10, 2019
1 parent 524bdf4 commit 0aa1e20
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/stats-uid-gid.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ test('graceful fs includes correct uid & gid', function (t) {
t.end()
})

test('graceful fs includes correct uid & gid (async)', function (t) {
gfs.stat(__filename, function (er, stats) {
t.notOk(er)
t.ok(stats)
t.ok(stats.uid)
t.ok(stats.gid)
t.equal(stats.uid, 501)
t.equal(stats.gid, 20)
t.end()
})
})

test('does not throw when async stat fails', function (t) {
gfs.stat(__filename + ' this does not exist', function (er, stats) {
t.ok(er)
Expand Down

0 comments on commit 0aa1e20

Please sign in to comment.