Skip to content

Commit

Permalink
Make error test not dependent on format of error messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
samrum committed Sep 19, 2019
1 parent d681e4d commit 1115d8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/CommandDelegator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ describe("OnStarAccessory", () => {
when(onStarMock.start()).thenThrow(new Error(errorMessage));

commandDelegator.setClimateOn(true, (error: string) => {
expect(error).toEqual(`Error: ${errorMessage}`);
expect(error).toBeDefined;
expect(error).not.toBeNull;
done();
});
});
Expand Down

0 comments on commit 1115d8b

Please sign in to comment.