Skip to content

Commit

Permalink
➕ chore(deps-dev): add dependency @testing-library/jest-dom
Browse files Browse the repository at this point in the history
  • Loading branch information
m-tartari committed Jan 20, 2024
1 parent 92d8f94 commit e8fcd57
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 3 deletions.
122 changes: 122 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"@types/react": "^18.2.43",
Expand Down
6 changes: 3 additions & 3 deletions src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Renders main page correctly', async () => {
const h1 = await screen.queryByText('Vite + React');

// Post Expectations
expect(h1).not.toBeNull();
expect(h1).toBeInTheDocument();
});

/**
Expand All @@ -36,7 +36,7 @@ describe('Renders main page correctly', async () => {
const button = await screen.queryByText('count is 0');

// Expectations
expect(button).not.toBeNull();
expect(button).toBeInTheDocument();
});

/**
Expand All @@ -49,7 +49,7 @@ describe('Renders main page correctly', async () => {
const button = await screen.queryByText('count is 0');

// Pre Expectations
expect(button).not.toBeNull();
expect(button).toBeInTheDocument();

// Actions
await user.click(button as HTMLElement);
Expand Down

0 comments on commit e8fcd57

Please sign in to comment.