mirror of https://github.com/lukechilds/node.git
1 changed files with 24 additions and 0 deletions
@ -0,0 +1,24 @@ |
|||
include("mjsunit.js"); |
|||
|
|||
var got_error = false; |
|||
var got_success = false; |
|||
var stats; |
|||
|
|||
var promise = node.fs.stat("."); |
|||
|
|||
promise.addCallback(function (_stats) { |
|||
stats = _stats; |
|||
p(stats); |
|||
got_success = true; |
|||
}); |
|||
|
|||
promise.addErrback(function () { |
|||
got_error = true; |
|||
}); |
|||
|
|||
function onExit () { |
|||
assertTrue(got_success); |
|||
assertFalse(got_error); |
|||
assertTrue(stats.mtime instanceof Date); |
|||
} |
|||
|
Loading…
Reference in new issue