mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
25 lines
393 B
JavaScript
25 lines
393 B
JavaScript
|
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);
|
||
|
}
|
||
|
|