Skip to content

Commit a6fb809

Browse files
committed
Update tests to use unified docsifyInit()
1 parent a099160 commit a6fb809

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

tests/e2e/vue.test.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
const docsifyInit = require('./helpers/docsify-init');
1+
const docsifyInit = require('../helpers/docsify-init');
22

33
describe(`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');

0 commit comments

Comments
 (0)