Archived
1
0

Include code in stringified errors

This is done by returning the entire error stringified instead of just
the message.

This fixes the issue with the "save as" dialog.
This commit is contained in:
Asher
2019-02-26 15:46:05 -06:00
parent be3f0c437f
commit d556e110cb
7 changed files with 41 additions and 84 deletions

View File

@ -496,8 +496,9 @@ describe("fs", () => {
});
it("should fail to stat nonexistent file", async () => {
await expect(util.promisify(fs.stat)(tmpFile()))
.rejects.toThrow("ENOENT");
const error = await util.promisify(fs.stat)(tmpFile()).catch((e) => e);
expect(error.message).toContain("ENOENT");
expect(error.code).toBe("ENOENT");
});
});