Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 13, 2024
1 parent 6e53dc2 commit ff4e49c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/utils/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export async function parseContent(key: string, content: string, collection: Res
rehypePlugins: {
highlight: mdcOptions.highlight === false
? undefined
: await getHighlightPluginInstance({ ...mdcOptions.highlight, compress: true }),
: await getHighlightPluginInstance({ ...mdcOptions.highlight, compress: (mdcOptions as { compress: boolean })?.compress !== false }),
...mdcOptions?.rehypePlugins,
...contentOptions?.rehypePlugins,
},
Expand Down
16 changes: 8 additions & 8 deletions test/unit/defineCollection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('defineCollection', () => {
type: 'page',
source: {
_resolved: true,
include: '**',
cwd: '~~/content/pages',
include: 'pages/**',
cwd: '',
},
})

Expand Down Expand Up @@ -62,10 +62,10 @@ describe('defineCollection', () => {
expect(collection).toMatchObject({
type: 'page',
source: {
include: '**',
include: 'pages/**',
prefix: 'blog',
exclude: ['pages/blog/index.md'],
cwd: '~~/content/pages',
cwd: '',
},
})

Expand All @@ -88,8 +88,8 @@ describe('defineCollection', () => {
type: 'data',
source: {
_resolved: true,
include: '**',
cwd: '~~/content/data',
include: 'data/**',
cwd: '',
},
})

Expand All @@ -116,8 +116,8 @@ describe('defineCollection', () => {
expect(collection).toMatchObject({
type: 'data',
source: {
include: '**',
cwd: '~~/content/data',
include: 'data/**',
cwd: '',
prefix: 'blog',
exclude: ['data/blog/index.md'],
},
Expand Down

0 comments on commit ff4e49c

Please sign in to comment.