From 4ea567287709533186276117e2f812ee2f0ebd6b Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Wed, 14 Oct 2026 11:54:18 -0700 Subject: [PATCH 1/2] Fix test cleanup and clarify Node.js LTS setup text Run Vitest with --globals so React Testing Library unmounts components after each test. Without it, two tests that render App in the same file fail with "Found multiple elements". tsconfig already loads the vitest/globals types. Tell learners to compare node -v with the LTS version on the Node.js download page, so the setup text stays correct without a pinned version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- 00-setup/README.md | 4 ++-- samples/book-app-web/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/00-setup/README.md b/00-setup/README.md index a63e495..7de8c8a 100644 --- a/00-setup/README.md +++ b/00-setup/README.md @@ -21,7 +21,7 @@ By the end of this chapter, you'll be able to: - A [Copilot plan](https://github.com/features/copilot/plans), or you can opt to continue with your own model provider during sign-in - For Copilot Business or Enterprise, the **GitHub Copilot app** policy must be enabled. - [Git](https://git-scm.com/install) installed on your machine -- [Node.js LTS](https://nodejs.org) to run `samples/book-app-web` for the hands-on exercises +- [Node.js](https://nodejs.org/en/download) (the version marked **LTS**) to run `samples/book-app-web` for the hands-on exercises - [GitHub CLI (`gh`)](https://cli.github.com) for the initial one-time setup script used in the course You will check the tool versions in the Copilot app's **Terminal** tab after connecting your repository. @@ -105,7 +105,7 @@ Select **+** next to **Projects**, then choose the option that matches what you gh --version ``` - Each command should display a version number. For `node -v`, the sample app requires [Node.js LTS](https://nodejs.org) or later. + Each command should display a version number. For `node -v`, compare the first number with the **LTS** version on the [Node.js download page](https://nodejs.org/en/download). For example, `v24.22.0` starts with `24`. If your number is lower, install the LTS version.
Windows: npm fails because running scripts is disabled diff --git a/samples/book-app-web/package.json b/samples/book-app-web/package.json index 1f03314..c4fe147 100644 --- a/samples/book-app-web/package.json +++ b/samples/book-app-web/package.json @@ -8,7 +8,7 @@ }, "scripts": { "dev": "vite", - "test": "vitest --environment jsdom", + "test": "vitest --environment jsdom --globals", "typecheck": "tsc --noEmit", "build": "tsc --noEmit && vite build" }, From 2eb8db8691392ef5009c627fac9aea184530e8c5 Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Wed, 14 Oct 2026 12:35:50 -0700 Subject: [PATCH 2/2] Update README.md --- 00-setup/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/00-setup/README.md b/00-setup/README.md index 7de8c8a..d26a720 100644 --- a/00-setup/README.md +++ b/00-setup/README.md @@ -105,7 +105,7 @@ Select **+** next to **Projects**, then choose the option that matches what you gh --version ``` - Each command should display a version number. For `node -v`, compare the first number with the **LTS** version on the [Node.js download page](https://nodejs.org/en/download). For example, `v24.22.0` starts with `24`. If your number is lower, install the LTS version. + Each command should display a version number. For `node -v`, compare the first number with the **LTS** version on the [Node.js download page](https://nodejs.org/en/download). If your number is lower, install the LTS version.
Windows: npm fails because running scripts is disabled