Feat/list books#1
Merged
Merged
Conversation
Implements a new page at the `/books` URL that fetches a list of books from the backend API and displays them. - Follows a strict TDD workflow, starting with a failing integration test. - Creates a reusable API client module for interacting with the backend, configurable via environment variables. - Establishes a robust testing pattern for mocking ES Modules using `jest.unstable_mockModule` and a dynamic import strategy. - Refactors the complex test setup logic into a reusable `setupMockedApp` test helper to keep tests clean and DRY. - Includes a Nunjucks template to render the book list using GOV.UK Design System components.
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.
Pull Request: Book List Page and CI Pipeline
This pull request introduces the first core feature of the application: a page to display a list of all books fetched from the backend API. It also establishes the foundational CI pipeline for the project.
Feature
/booksthat renders a list of books.Chore
npm teston all pull requests targeting themainbranch.How to Manually Test
Check out this branch:
Install dependencies:
Start the backend API server.
Run the frontend server:
Navigate to the books page:
Open your browser and go to http://localhost:3000/books.
Expected Result
You should see a GOV.UK-styled page with a list of books fetched from your local API.