Skip to content

test: mdx rehype plugin#48

Open
peppermintc wants to merge 1 commit intomintlify:mainfrom
peppermintc:peppermintc/test-rehype-plugin
Open

test: mdx rehype plugin#48
peppermintc wants to merge 1 commit intomintlify:mainfrom
peppermintc:peppermintc/test-rehype-plugin

Conversation

@peppermintc
Copy link

@peppermintc peppermintc commented Jan 21, 2026

Summary

  • rehype plugin test to check refactoring code changes
  • unit test and snapshot test is added
  • dev dependencies added for snapshot test

Test Command

  • open terminal at mdx/packages/mdx
  • yarn install
  • yarn test

Test Details

Unit Test

  • checks if pre node gets properties as expected after running rehype plugin

Snapshot Test

  • checks syntax highlighting, twoslash and link support
  • snapshot test can ensure markdown to HTML is working as before, this can determine correct classnames and metadata are created on the rehype plugin hast result

Fixture File Types

  • .md: input markdown file
  • .out.html: output HTML file
  • mock-hast-tree: basic mock hast data
  • fixtures are referenced from examples/highlight-example.mdx

Reference

Demo

test-rehype.mp4

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.

1 participant

Comments