Skip to content

Commit

Permalink
update exercise5
Browse files Browse the repository at this point in the history
  • Loading branch information
talgat-ruby committed Nov 8, 2023
1 parent 857e6f7 commit b43165b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion exercise5/problem8/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,16 @@ describe("exercise5 - problem7", () => {
expect(fetchMock).toBeCalledTimes(0);
const resPromise = fetchCharacterWithMovies(4);
expect(fetchMock).toBeCalledTimes(1);
await resPromise;
await vi.runOnlyPendingTimersAsync();
await expect(resPromise).resolves.toStrictEqual({
name: character.name,
films: [
movies[0].title,
movies[1].title,
movies[2].title,
movies[3].title,
],
});
expect(fetchMock).toBeCalledTimes(1 + movies.length);
});

Expand Down

0 comments on commit b43165b

Please sign in to comment.