Skip to content

Commit

Permalink
Add async tests to show jestjs/jest#11563
Browse files Browse the repository at this point in the history
  • Loading branch information
k2snowman69 committed Jun 15, 2021
1 parent 013c2a7 commit 91059bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions end-common-js/src/add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ describe("add", () => {
expect(value).toBe(6);
});

it("should add two values (async)", async () => {
let value = await Utils.addTwice("1", "2");
expect(value).toBe(6);
});

it("should throw exception if invalid value provided", () => {
expect(() => {
Utils.addTwice({}, "2");
Expand Down
5 changes: 5 additions & 0 deletions end-module/src/add.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ describe("add", () => {
expect(value).toBe(6);
});

it("should add two values (async)", async () => {
let value = await Utils.addTwice("1", "2");
expect(value).toBe(6);
});

it("should throw exception if invalid value provided", () => {
expect(() => {
Utils.addTwice({}, "2");
Expand Down

0 comments on commit 91059bd

Please sign in to comment.