Add unit testing framework with Jest and React Testing Library#5
Open
bigweavergammainternal[bot] wants to merge 1 commit intomainfrom
Open
Add unit testing framework with Jest and React Testing Library#5bigweavergammainternal[bot] wants to merge 1 commit intomainfrom
bigweavergammainternal[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was generated by @kiro-agent 👻
Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent
This pull request was generated by @kiro-agent 👻
You can interact with this PR using the following commands:
Learn more about Kiro automation
Summary
This PR establishes a comprehensive unit testing framework for the amplify-next-template repository using Jest and React Testing Library, specifically configured for Next.js 14 applications. The implementation provides a solid foundation for maintaining code quality and ensuring component reliability through automated testing.
Configuration Files Added:
jest.config.js- Jest configuration using Next.js's built-in Jest support@/importsjest.setup.js- Jest setup file with essential mocks@testing-library/jest-domfor extended matchersnext/font/google(Inter font)aws-amplifyconfigurationaws-amplify/datawith generateClient functionality@aws-amplify/ui-react/styles.cssamplify_outputs.jsonconfigurationwindow.promptbrowser APITest Files Added:
__tests__/page.test.tsx- Tests for the main page component (app/page.tsx)__tests__/layout.test.tsx- Tests for the root layout component (app/layout.tsx)Test Scripts Added:
test- Run all tests:jesttest:watch- Run tests in watch mode:jest --watchtest:coverage- Run tests with coverage report:jest --coverageDependencies Added:
jest@^29.7.0- JavaScript testing frameworkjest-environment-jsdom@^29.7.0- JSDOM environment for browser-like testingts-jest@^29.2.5- TypeScript preprocessor for Jest@testing-library/react@^16.0.1- React component testing utilities@testing-library/jest-dom@^6.5.0- Custom Jest matchers for DOM assertions@types/jest@^29.5.13- TypeScript definitions for Jest######[This description was generated by Claude]