File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 1- const docsifyInit = require ( './helpers/docsify-init' ) ;
1+ const docsifyInit = require ( '.. /helpers/docsify-init' ) ;
22
33describe ( `Vue.js Rendering` , function ( ) {
4- const contentMarkdown = `<div id="test">test<span v-for="i in 5">{{ i }}</span></div>` ;
5- const scriptURLs = [ 'https://unpkg.com/vue@2/dist/vue.js' ] ;
4+ const sharedConfig = {
5+ markdown : {
6+ homepage : '<div id="test">test<span v-for="i in 5">{{ i }}</span></div>' ,
7+ } ,
8+ scriptURLs : [ 'https://unpkg.com/vue@2/dist/vue.js' ] ,
9+ } ;
610
711 // Tests
812 // ---------------------------------------------------------------------------
913 test ( 'does render Vue content when executeScript is unspecified' , async ( ) => {
10- await docsifyInit ( {
11- contentMarkdown,
12- scriptURLs,
13- } ) ;
14+ await docsifyInit ( sharedConfig ) ;
1415
1516 const testResult = await page . textContent ( '#test' ) ;
1617
@@ -19,11 +20,10 @@ describe(`Vue.js Rendering`, function() {
1920
2021 test ( 'does render Vue content when executeScript:true' , async ( ) => {
2122 await docsifyInit ( {
23+ ...sharedConfig ,
2224 config : {
2325 executeScript : true ,
2426 } ,
25- contentMarkdown,
26- scriptURLs,
2727 } ) ;
2828
2929 const testResult = await page . textContent ( '#test' ) ;
@@ -33,11 +33,10 @@ describe(`Vue.js Rendering`, function() {
3333
3434 test ( 'does not render Vue content when executeScript:false' , async ( ) => {
3535 await docsifyInit ( {
36+ ...sharedConfig ,
3637 config : {
3738 executeScript : false ,
3839 } ,
39- contentMarkdown,
40- scriptURLs,
4140 } ) ;
4241
4342 const testResult = await page . textContent ( '#test' ) ;
You can’t perform that action at this time.
0 commit comments