evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
Build a reusable toolkit that processes multiple MDX and Markdown files with consistent configuration. The toolkit should efficiently handle both file formats and apply consistent transformations across all files.
Your toolkit should:
Create a file processor-toolkit.js that exports a class or set of functions with the following functionality:
Input: Array of file objects with path and content properties
[
{ path: 'example.mdx', content: '# Hello World' },
{ path: 'readme.md', content: '## Documentation' }
]Output: Array of result objects with compilation status
[
{ path: 'example.mdx', success: true, code: '...compiled code...' },
{ path: 'readme.md', success: false, error: 'error message' }
]File: processor-toolkit.test.js
Test description: Create a processor and compile a simple MDX file
Input:
const files = [
{ path: 'test.mdx', content: '# Hello\n\nThis is **bold** text.' }
];Expected behavior:
File: processor-toolkit.test.js
Test description: Process multiple files with the same processor instance
Input:
const files = [
{ path: 'doc1.mdx', content: '# Document 1' },
{ path: 'doc2.md', content: '## Document 2' },
{ path: 'doc3.mdx', content: 'Some content with <Component />' }
];Expected behavior:
File: processor-toolkit.test.js
Test description: Handle invalid MDX syntax gracefully
Input:
const files = [
{ path: 'valid.mdx', content: '# Valid Content' },
{ path: 'invalid.mdx', content: '# Test\n\n<UnClosedTag' }
];Expected behavior:
Provides MDX compilation capabilities. Use this package to create and configure the processor for transforming MDX and Markdown content.
Your solution will be evaluated based on: