diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f1b091c..41ece4c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,9 +21,9 @@ updates: # one package that its peers reject. Dependabot puts a dependency in the # first group it matches, so these sit above `routine`. react: - # framer-motion 7 accepts only React 18, and @testing-library/react - # 13 only react-dom 18: neither can stay behind on React 19. - patterns: ["react", "react-dom", "@testing-library/react", "framer-motion"] + # @testing-library/react 13 accepts only react-dom 18, so it cannot + # stay behind on React 19. + patterns: ["react", "react-dom", "@testing-library/react"] fontawesome: # react-fontawesome 0.2 accepts fontawesome-svg-core up to 6, and the # icon packages track svg-core's major. diff --git a/CLAUDE.md b/CLAUDE.md index 0521454..fbfa322 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,7 +33,8 @@ point of this family — it rules out ES module `import` between files, `fetch() JSON, and anything else that needs an origin. Scripts communicate through globals on `window`, which is a deliberate trade, not an oversight. -`bmi/` has a `package.json`, but only for Jest. The page itself still runs unbuilt. +`bmi/` has a `package.json`, but only for its Vitest tests. Vite runs the tests; the page +itself still runs unbuilt. ### 2. Bundled apps (Vite) diff --git a/README.md b/README.md index 1ef9f96..dcc53ab 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Minor JavaScript and React applications ## Content -* [BMI](/bmi/README.md) - Body mass index calculator webpage + jest +* [BMI](/bmi/README.md) - Body mass index calculator webpage + vitest * [lemon](/lemon/README.md) - project for Meta-Front End Developer Professional Certificate * [mathparser](/mathparser/README.md) - a simple math calculator for complex expressions * [portfolio](/portfolio/README.md) - a React application diff --git a/bmi/README.md b/bmi/README.md index 9ce49f3..62fd0d1 100644 --- a/bmi/README.md +++ b/bmi/README.md @@ -58,27 +58,20 @@ The "?" button, next to the theme toggle, explains the units for each mode and h To run tests -> execute next command line: npm run test +The tests run on [Vitest](https://vitest.dev/). `--globals` in the `test` script provides +`test` and `expect` without an import, as Jest did, so `bmi.test.js` reads the same under +either. Vite is used only to run the tests; the page itself is never built. + +bmi tested with Jest until +[GHSA-gcqx-w48m-w2h4](https://github.com/advisories/GHSA-gcqx-w48m-w2h4) was published against +deepmerge, which every Jest release since 25.2 depends on and no deepmerge release fixes. +Vitest does not use deepmerge, and it is what `lemon/react-js`, `portfolio` and `weather` +already test with. + ## Notes [Back to top](#bmi) -* bmi.js is a js file with simple js functions, used both by the Jest tests and directly by index.html as a plain `