test: add awaits to rejects and resolves
This commit is contained in:
parent
84d7da0195
commit
826dc1062a
4 changed files with 6 additions and 6 deletions
|
|
@ -51,7 +51,7 @@ describe("convert", () => {
|
|||
|
||||
test("should reject if execFile returns an error", async () => {
|
||||
mockExecFile = (cmd, args, callback) => callback(new Error("fail"), "", "stderr output");
|
||||
expect(
|
||||
await expect(
|
||||
convert("input.png", "png", "svg", "output.svg", undefined, mockExecFile),
|
||||
).rejects.toMatch(/error: Error: fail\nstderr: stderr output/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue