Skip to content

Commit 7811b07

Browse files
Copilothotlong
andcommitted
test: verify content body preservation in migrate test
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 11cd9cb commit 7811b07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/cli/test/cli-lifecycle.test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ describe('CLI Lifecycle: init → content → build', () => {
238238
// Verify the H1 heading is removed (it's in frontmatter now)
239239
expect(mdxContent).not.toMatch(/^# My Guide$/m);
240240

241+
// Verify content body is preserved (code blocks, sections)
242+
expect(mdxContent).toContain('## Installation');
243+
expect(mdxContent).toContain('npm install my-lib');
244+
expect(mdxContent).toContain('## Usage');
245+
241246
// Verify meta.json was updated
242247
const meta = JSON.parse(
243248
fs.readFileSync(path.join(testDir, 'content', 'docs', 'meta.json'), 'utf-8'),

0 commit comments

Comments
 (0)