Skip to content

chore(tests): add some tests for ReadMe custom components#1354

Open
maximilianfalco wants to merge 12 commits intofalco/mdxish-cleanupfrom
falco/mdxish-cleanup-2
Open

chore(tests): add some tests for ReadMe custom components#1354
maximilianfalco wants to merge 12 commits intofalco/mdxish-cleanupfrom
falco/mdxish-cleanup-2

Conversation

@maximilianfalco
Copy link
Copy Markdown
Contributor

PR App Fix RM-XYZ

🧰 Changes

This is a follow up of #1353. This PR mainly adds test for existing functions for more robust regression prevention.

🧬 QA & Testing

@maximilianfalco maximilianfalco changed the title chore(tests): add some renderMdxish tests for readme custom components chore(tests): add some tests for ReadMe custom components Feb 23, 2026
@maximilianfalco maximilianfalco marked this pull request as ready for review February 23, 2026 11:33
@eaglethrost
Copy link
Copy Markdown
Contributor

I wonder if we break this PR down further so it's easier to read, maybe into 2 parts for different batches of components?

@maximilianfalco
Copy link
Copy Markdown
Contributor Author

maximilianfalco commented Feb 24, 2026

@eaglethrost this is already broken down into several parts tbh, this one just has a lot of diffs because im just consolidating and adding missing tests

what do you reckon needs to be split

@eaglethrost
Copy link
Copy Markdown
Contributor

@eaglethrost this is already broken down into several parts tbh, this one just has a lot of diffs because im just consolidating and adding missing tests

what do you reckon needs to be split

Maybe we can split it like:

  1. Has only the new components test files
  2. Adds on / modifies existing test files

I feel like reading 25ish files is quite too big

@maximilianfalco
Copy link
Copy Markdown
Contributor Author

okay I think looking at this again, it should be fine. thankfully most of the file changes are trivial and easy to review. Out of 39, we have

  • 7 snapshot changes/deleteions
  • 6 test file deletions
  • 3 file renames

so that brings it to 25 files changed. which is still significant but those changes are just test additions

eaglethrost added a commit that referenced this pull request Apr 17, 2026
| 🎫 Resolve ISSUE_ID |
| :-----------------: |

## 🎯 What does this PR do?

Increased test coverage for the readme components & added testing for
both the mdx & mdxish rendering engine. This is to better catch
potential regressions from changes, and also ensure mdx & mdxish outputs
are consistent with each other. This copies some tests from Falco's old
PR in #1354

- Added a test pattern where the same input should be rendered with all
the rendering engines, utilising snapshots for some tests
- Created a customComponents fixture to help with MDX component tests

## 🧪 QA tips

Every new test should pass
rafegoldberg pushed a commit that referenced this pull request Apr 22, 2026
## Version 14.1.0
### ⚠ BREAKING CHANGES

* **mdxish:** AST nodes
- We can't just use safeMode because we still need the inline
expressions to be parsed as expression nodes, so there still needs to be
an expression parsing

## 🎯 What does this PR do?

### ✨ New & Improved

* **mdxish:** remove jsx attribute expression preprocessing ([#1429](#1429)) ([9545472](9545472)), closes [#1426](#1426)

### 🛠 Fixes & Updates

* add readme components tests ([#1434](#1434)) ([72ea080](72ea080)), closes [#1354](#1354)
* **deps:** bump actions/upload-artifact from 5 to 7 ([#1417](#1417)) ([3ca6d32](3ca6d32))
* **mdxish:** legacy glossary syntax in callout title crashing ([#1441](#1441)) ([9d1b18b](9d1b18b))

<!--SKIP CI-->
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