Skip to content

Instantly share code, notes, and snippets.

@mxdvl
Last active August 18, 2025 09:45
Show Gist options
  • Select an option

  • Save mxdvl/615c1673e08bca6fb9ef59b779cef22b to your computer and use it in GitHub Desktop.

Select an option

Save mxdvl/615c1673e08bca6fb9ef59b779cef22b to your computer and use it in GitHub Desktop.
`react-markdown` transforms for Jest
const config = {
transformIgnorePatterns: [
`node_modules/(?!${[
'react-markdown',
'(comma|space)-separated-tokens',
'(hast|mdast|estree|unist)-util-.+',
'bail',
'ccount',
'character-entities',
'decode-named-character-reference',
'devlop/lib/default',
'escape-string-regexp',
'is-plain-obj',
'html-url-attributes',
'longest-streak',
'markdown-table',
'micromark',
'property-information',
'remark-.+',
'trim-lines',
'trough',
'unified',
'vfile(-?.+)?',
'zwitch',
]
.map((name) => `(?:${name})`)
.join('|')})`,
],
};
export default config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment