Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
fterh committed Feb 9, 2020
1 parent e9e2f33 commit a65ee58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Commands } from "../commandSet";

export default async (command: string, parsedMail: ParsedMail) => {
if (parsedMail.from.value[0].address !== email) {
console.warn(
throw new Error(
"Command email's sender is inconsistent with environment variable EMAIL."
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/commands/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ it("should throw if the command is unrecognized", async () => {

it("should throw if the command is not authenticated", async () => {
const res = handleCommand("somecommand", testEmailUnauthenticated);
expect(res).rejects.toEqual(
await expect(res).rejects.toEqual(
new Error(
"Command email's sender is inconsistent with environment variable EMAIL."
)
Expand Down

0 comments on commit a65ee58

Please sign in to comment.