File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/@vuepress/core/lib/node/__tests__/prepare Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,16 @@ describe('markdown page', () => {
100
100
expect ( page . _strippedContent ) . toBe ( content )
101
101
} )
102
102
103
+ test ( 'should be able add a page with explicit content' , async ( ) => {
104
+ const { filePath } = getDocument ( 'README.md' )
105
+ const content = await readFile ( filePath )
106
+ const markdown = getMarkdown ( )
107
+ const page = await setupPage ( { content } , { markdown } )
108
+
109
+ expect ( page . _content ) . toBe ( content )
110
+ expect ( page . _strippedContent ) . toBe ( content )
111
+ } )
112
+
103
113
test ( 'should work with frontmatter when pointing to a markdown file' , async ( ) => {
104
114
const { relative, filePath } = getDocument ( 'alpha.md' )
105
115
const title = 'VuePress Alpha' // from fixture
@@ -274,6 +284,5 @@ describe('public api', () => {
274
284
275
285
// TODO permalink - driven by global pattern
276
286
// TODO I18n
277
- // TODO Add a page with explicit content
278
287
// TODO SFC
279
288
You can’t perform that action at this time.
0 commit comments