0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/mjsunit/test-fs-stat.js

25 lines
393 B
JavaScript
Raw Normal View History

2009-06-29 14:11:26 +02:00
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);
}