Skip to content

Commit 166d014

Browse files
committed
Make analyze --allow-error test more specific
1 parent 1efa57c commit 166d014

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/jest/analyze.test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,28 @@ describe("analyze", () => {
8383
).rejects.toThrow();
8484
});
8585

86+
it.failing("should print Checked when there are errors", async () => {
87+
await expect(ctx.runEask("analyze Eask-error")).rejects.toMatchObject({
88+
stderr: "(Checked 1 file)",
89+
});
90+
});
91+
8692
it.failing("should check all files when --allow-error is set", async () => {
93+
// this is not a great test because when there is any error it doesn't print this note
8794
await expect(
8895
ctx.runEask("analyze --allow-error Eask-normal Eask-error"),
8996
).rejects.toMatchObject({ stderr: "(Checked 2 files)" });
9097
});
98+
99+
// although the output does match, it still doesn't exit with an error
100+
it.failing(
101+
"should have later warnings when --allow-error is set",
102+
async () => {
103+
await expect(
104+
ctx.runEask("analyze --allow-error Eask-error Eask-warn"),
105+
// this warning is specific to Eask-warn
106+
).rejects.toMatchObject({ stderr: "missing `none.el'" });
107+
},
108+
);
91109
});
92110
});

0 commit comments

Comments
 (0)