Skip to content

Commit

Permalink
remove async await from image test
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Apr 25, 2020
1 parent 681b8e0 commit 9d86342
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions plugins/image/tests/image.test.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
const test = require('tape')
const wtf = require('./_lib')

test('image-methods', async function(t) {
test('image-methods', function (t) {
wtf
.fetch('casa', 'it', {
wiki: `wiktionary`
})
.then(async function(doc) {
.then(function (doc) {
let img = doc.images(0)
const bool = await img.exists()
t.equal(bool, true, 'img exists')
img.exists().then((bool) => {
t.equal(bool, true, 'img exists')

let url = img.commonsURL()
t.ok(url, 'commons-url')
let url = img.commonsURL()
t.ok(url, 'commons-url')

t.end()
t.end()
})
})
})

0 comments on commit 9d86342

Please sign in to comment.