rework TODOs

improve-test-setup
Anton Wilhelm 5 years ago
parent dac0bfec6c
commit 2039e0dd1c
  1. 2
      test/_helper.js
  2. 1
      test/integration/render.js
  3. 1
      test/integration/router.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)

@ -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
})
})

@ -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
})
})

Loading…
Cancel
Save