rework TODOs

This commit is contained in:
Anton Wilhelm 2019-03-06 21:53:09 +01:00
commit 2039e0dd1c
3 changed files with 3 additions and 1 deletions

View file

@ -63,7 +63,7 @@ module.exports.init = function(fixture = 'default', config = {}, markup) {
return new Promise((resolve, reject) => {
ready(() => {
const docsify = new Docsify()
// TODO: use callback instead of polling, but usually it works after 10ms
// NOTE: I was not able to get it working with a callback, but polling works usually at the first time
const id = setInterval(() => {
if (dom.window.document.body.innerHTML.indexOf(NOT_INIT_PATTERN) == -1) {
clearInterval(id)

View file

@ -8,6 +8,7 @@ describe('full docsify initialization', function() {
it('TODO: check generated markup', async function() {
const {docsify, dom} = await init('simple', {loadSidebar: true})
console.log(dom.window.document.body.innerHTML)
// TODO: add some expectations
})
})

View file

@ -8,6 +8,7 @@ describe('router', function() {
it('TODO: trigger to load another page', async function() {
const {docsify} = await init()
window.location = '/?foo=bar'
// TODO: add some expectations
})
})