Skip to content

Commit

Permalink
chore: vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
wescopeland committed Jan 15, 2025
1 parent 567c261 commit ff7de61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ describe('Component: AchievementGroup', () => {
render(<AchievementGroup group={group} showGame={true} />);

// ASSERT
expect(screen.getByText(/First Achievement/)).toBeVisible();
expect(screen.getByText(/First Game/)).toBeVisible();
expect(screen.getAllByText(/First Achievement/)[0]).toBeVisible();
expect(screen.getAllByText(/First Game/)[0]).toBeVisible();
expect(screen.getByText(/Do the first thing/)).toBeVisible();
expect(screen.getByText(/Second Achievement/)).toBeVisible();

expect(screen.getAllByText(/Second Achievement/)[0]).toBeVisible();
expect(screen.getByText(/Do the second thing/)).toBeVisible();
expect(screen.getByText(/Third Achievement/)).toBeVisible();

expect(screen.getAllByText(/Third Achievement/)[0]).toBeVisible();
expect(screen.getByText(/Do the third thing/)).toBeVisible();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ describe('Component: UnlockableAchievementAvatar', () => {
expect(img).toBeVisible();
expect(img.src).toContain(achievement.badgeLockedUrl);

expect(screen.getByText(/Creative Name/)).toBeVisible();
expect(screen.getByText(/Container Set/)).toBeVisible();
expect(screen.getAllByText(/Creative Name/)[0]).toBeVisible();
expect(screen.getAllByText(/Container Set/)[0]).toBeVisible();
expect(screen.getByText(/Do the thing/)).toBeVisible();
expect(screen.queryByText(/unlocked/i)).toBeNull();
});
Expand Down

0 comments on commit ff7de61

Please sign in to comment.