import { describe, it, expect } from 'vitest';
import { fixMdxDataProps } from '../lib/mdx-utils';
describe('MDX Data Props Fixer', () => {
it('should correctly parse MDX with nested JSON containing }}', () => {
// This string simulates the exact structure that causes the bug in n2x2y.mdx
const mdxInput = ``;
const result = fixMdxDataProps(mdxInput);
const expected = ``;
expect(result).toBe(expected);
});
it('should not prematurely truncate if } appears inside a string literal', () => {
const mdxInput = `"}}} />`;
const result = fixMdxDataProps(mdxInput);
const expected = ``;
expect(result).toBe(expected.replace('>', '>'));
});
});