Skip to content

Fix test for new fields on VFileMessage - #124

Open
emre-mutlu wants to merge 1 commit into
remarkjs:mainfrom
emre-mutlu:fix-vfile-message-test
Open

emre-mutlu wants to merge 1 commit into
remarkjs:mainfrom
emre-mutlu:fix-vfile-message-test

Conversation

@emre-mutlu

Copy link
Copy Markdown

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything or linked relevant results below
  • I made sure the docs are up to date
  • I included tests (or that’s not needed)

Description of changes

npm test fails on main in the rehype-katex test “should handle errors, support errorColor”. The test compares a spread of file.messages[0] with a fixed object, and since vfile-message 4.0.3 the constructor sets actual, expected, file, note and url as own properties, so the spread has five more keys than the expected object. A fresh install gets 4.0.4, so this fails for everyone, and it is also why CI is red on #122.

This adds the five fields to the expected object. Nothing in lib/ changes.

With this, npm test passes on main (Node 24.14.1), and also with the katex@^0.19.0 change from #122 applied on top (katex 0.19.1).

@github-actions github-actions Bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e99b9d0) to head (b1dd236).
⚠️ Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #124   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        14    -1     
  Lines         1823      1866   +43     
=========================================
+ Hits          1823      1866   +43     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤞 phase/open Post is being triaged manually

Development

Successfully merging this pull request may close these issues.

1 participant