Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
add test
  • Loading branch information
sy-records committed Oct 15, 2020
commit a17c0dcc8eea4c11764097f1055a7b9e6cfa5dad
23 changes: 23 additions & 0 deletions test/e2e/search.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,27 @@ describe('Search Plugin Tests', function() {
await page.fill('input[type=search]', 'test');
await expect(page).toEqualText('.results-panel h2', 'Test Page');
});

test('search ignore title', async () => {
const docsifyInitConfig = {
markdown: {
homepage: `
# Hello World

This is the homepage.

## Test ignore title <!-- {docsify-ignore} -->

This is the test ignore title.
`,
},
scriptURLs: ['/lib/plugins/search.min.js'],
styleURLs: ['/lib/themes/vue.css'],
};
await docsifyInit(docsifyInitConfig);
await page.fill('input[type=search]', 'Test ignore title');
expect(await page.innerText('.results-panel h2')).toEqual(
'Test ignore title'
);
});
});