Skip to content

test(config): migrate normalize tests to vitest - #7155

Merged
serhalp merged 3 commits into
netlify:mainfrom
43081j:jg/config-vitest-normalize
Aug 11, 2026
Merged

test(config): migrate normalize tests to vitest#7155
serhalp merged 3 commits into
netlify:mainfrom
43081j:jg/config-vitest-normalize

Conversation

@43081j

@43081j 43081j commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This migrates the normalize tests to vitest.

As part of that, it drops omit.js since it can't load without some funkiness in vitest and is redundant anyway.

The snapshots were diffed locally and appear to be equal (via a script i had claude make).


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures
    we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or
    something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures
    your code follows our style guide and passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

@43081j
43081j requested a review from a team as a code owner August 5, 2026 15:07
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bd028647-a7aa-4528-a9b1-a5ab0222452b

📥 Commits

Reviewing files that changed from the base of the PR and between 9a7f024 and 8538d2d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • packages/config/package.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/config/package.json

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Expanded configuration normalization coverage for commands, defaults, functions, plugins, included files, and context-specific settings.
    • Added Vitest coverage alongside existing test suites, with improved test discovery, isolation, and timeout handling.
    • Extended linting support across additional test file patterns.
  • Refactor
    • Consolidated normalization tests into the newer test structure while preserving snapshot-based validation.

Walkthrough

The PR adds Vitest support to packages/config, updates test and CI scripts, and adds Vitest configuration. It expands ESLint suppression globs for .test.js files. It adds 160 lines of normalization snapshot tests covering commands, defaults, origins, functions, included files, and plugins.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: migrating the config normalize tests to Vitest.
Description check ✅ Passed The description explains the migration, dependency removal, snapshot validation, and checklist status; the missing issue link is non-critical.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

e18e dependency analysis

No dependency warnings found.

@pkg-pr-new

pkg-pr-new Bot commented Aug 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@netlify/build

npm i https://pkg.pr.new/@netlify/build@7155

@netlify/build-info

npm i https://pkg.pr.new/@netlify/build-info@7155

@netlify/cache-utils

npm i https://pkg.pr.new/@netlify/cache-utils@7155

@netlify/config

npm i https://pkg.pr.new/@netlify/config@7155

@netlify/edge-bundler

npm i https://pkg.pr.new/@netlify/edge-bundler@7155

@netlify/functions-utils

npm i https://pkg.pr.new/@netlify/functions-utils@7155

@netlify/git-utils

npm i https://pkg.pr.new/@netlify/git-utils@7155

@netlify/headers-parser

npm i https://pkg.pr.new/@netlify/headers-parser@7155

@netlify/api

npm i https://pkg.pr.new/@netlify/api@7155

@netlify/nock-udp

npm i https://pkg.pr.new/@netlify/nock-udp@7155

@netlify/opentelemetry-sdk-setup

npm i https://pkg.pr.new/@netlify/opentelemetry-sdk-setup@7155

@netlify/opentelemetry-utils

npm i https://pkg.pr.new/@netlify/opentelemetry-utils@7155

@netlify/redirect-parser

npm i https://pkg.pr.new/@netlify/redirect-parser@7155

@netlify/run-utils

npm i https://pkg.pr.new/@netlify/run-utils@7155

@netlify/zip-it-and-ship-it

npm i https://pkg.pr.new/@netlify/zip-it-and-ship-it@7155

commit: 8538d2d

serhalp
serhalp previously approved these changes Aug 6, 2026

@serhalp serhalp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Just one request inline please 🙏🏼

Comment thread packages/config/vitest.config.ts Outdated
Comment thread packages/config/package.json Outdated
43081j added 2 commits August 11, 2026 11:32
Removes `omit.js` and uses a native `Object.entries` filter instead.
Migrates the `normalize.js` tests to vitest.

Snapshots have been compared and are equal.
@43081j
43081j force-pushed the jg/config-vitest-normalize branch from 9a7f024 to 53ef49e Compare August 11, 2026 10:35
@43081j

43081j commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@serhalp i have split out #7168 which needs to land first, then ill rebase this (seems i can't use github stacked PRs for already open PRs)

@serhalp
serhalp merged commit aeab391 into netlify:main Aug 11, 2026
34 of 35 checks passed
@43081j
43081j deleted the jg/config-vitest-normalize branch August 11, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants