Fix loading within the CLI (#27)
* Fix loading within the CLI * Remove app * Remove promise handle * Fix requested changes
This commit is contained in:
@ -536,7 +536,7 @@ describe("fs", () => {
|
||||
});
|
||||
|
||||
describe("stat", () => {
|
||||
it("should stat", (done) => {
|
||||
it("should stat file", (done) => {
|
||||
fs.stat(testFile, (err, stats) => {
|
||||
expect(err).toBeUndefined();
|
||||
expect(stats.size).toBeGreaterThan(0);
|
||||
@ -546,6 +546,17 @@ describe("fs", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should stat folder", (done) => {
|
||||
const dir = tmpFile();
|
||||
nativeFs.mkdirSync(dir);
|
||||
|
||||
fs.stat(dir, (err, stats) => {
|
||||
expect(err).toBeUndefined();
|
||||
expect(stats.isDirectory()).toBeTruthy();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("should fail to stat", (done) => {
|
||||
fs.stat(path.join(__dirname, "no-exist"), (err, stats) => {
|
||||
expect(err).toBeDefined();
|
||||
|
Reference in New Issue
Block a user