Skip to content

Commit

Permalink
Increase timeout and load cheerio at top
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Jul 3, 2020
1 parent 158dd5c commit 1278744
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/antora/test.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* global describe it beforeEach */
const fs = require('fs')
const cheerio = require('cheerio')
const rimrafSync = require('rimraf')
const chai = require('chai')
const expect = chai.expect
Expand All @@ -14,13 +15,12 @@ describe('Antora integration', () => {
})
it('should generate a site with diagrams', async () => {
await generateSite([`--playbook=${__dirname}/site.yml`])
const cheerio = require('cheerio')
const $ = cheerio.load(fs.readFileSync(`${__dirname}/public/antora-kroki/sourcelocation.html`))
const imageElements = $('img')
expect(imageElements.length).to.equal(6)
imageElements.each((i, imageElement) => {
const src = $(imageElement).attr('src')
expect(src).to.startWith('_images/diag-')
})
}).timeout(10000)
}).timeout(30000)
})

0 comments on commit 1278744

Please sign in to comment.