Archived
1
0

Fix loading within the CLI (#27)

* Fix loading within the CLI

* Remove app

* Remove promise handle

* Fix requested changes
This commit is contained in:
Kyle Carberry
2019-02-05 11:15:20 -06:00
parent a85af49c58
commit 797efe72fd
28 changed files with 477 additions and 105 deletions

View File

@ -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();