From 2039e0dd1c61083324279479fff4b291408f1e7c Mon Sep 17 00:00:00 2001 From: Anton Wilhelm Date: Wed, 6 Mar 2019 21:53:09 +0100 Subject: [PATCH] rework TODOs --- test/_helper.js | 2 +- test/integration/render.js | 1 + test/integration/router.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/_helper.js b/test/_helper.js index 47e757863..4b4abce89 100644 --- a/test/_helper.js +++ b/test/_helper.js @@ -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) diff --git a/test/integration/render.js b/test/integration/render.js index adddfc454..7b2b253c1 100644 --- a/test/integration/render.js +++ b/test/integration/render.js @@ -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 }) }) diff --git a/test/integration/router.js b/test/integration/router.js index 5408683c1..b87e8022d 100644 --- a/test/integration/router.js +++ b/test/integration/router.js @@ -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 }) })