fix(mdx): handle productTabs in MDXContent to resolve Unknown Block Type
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🧪 QA (push) Successful in 1m13s
Build & Deploy / 🏗️ Build (push) Successful in 2m15s
Build & Deploy / 🚀 Deploy (push) Successful in 16s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m22s
Build & Deploy / 🔔 Notify (push) Successful in 3s
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 9s
Build & Deploy / 🧪 QA (push) Successful in 1m13s
Build & Deploy / 🏗️ Build (push) Successful in 2m15s
Build & Deploy / 🚀 Deploy (push) Successful in 16s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m22s
Build & Deploy / 🔔 Notify (push) Successful in 3s
This commit is contained in:
14
tests/mdx-content-mapping.test.tsx
Normal file
14
tests/mdx-content-mapping.test.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
describe('MDXContent Mapping', () => {
|
||||
it('should have productTabs in the switch statement to prevent Unknown Block Type errors', () => {
|
||||
const filePath = path.join(process.cwd(), 'components/MDXContent.tsx');
|
||||
const fileContent = fs.readFileSync(filePath, 'utf-8');
|
||||
|
||||
// Check if the switch case for productTabs exists
|
||||
expect(fileContent).toContain("case 'productTabs':");
|
||||
expect(fileContent).toContain('<ProductTechnicalData');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user