mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
416 B
24 lines
416 B
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;
|
|
});
|
|
|
|
process.addListener("exit", function () {
|
|
assertTrue(got_success);
|
|
assertFalse(got_error);
|
|
assertTrue(stats.mtime instanceof Date);
|
|
});
|
|
|
|
|