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', () => {
100100 expect ( page . _strippedContent ) . toBe ( content )
101101 } )
102102
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+
103113 test ( 'should work with frontmatter when pointing to a markdown file' , async ( ) => {
104114 const { relative, filePath } = getDocument ( 'alpha.md' )
105115 const title = 'VuePress Alpha' // from fixture
@@ -274,6 +284,5 @@ describe('public api', () => {
274284
275285// TODO permalink - driven by global pattern
276286// TODO I18n
277- // TODO Add a page with explicit content
278287// TODO SFC
279288
You can’t perform that action at this time.
0 commit comments