From 9d86342d976c5cb78c3a53e58874de210b368ec4 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Sat, 25 Apr 2020 13:25:22 -0400 Subject: [PATCH] remove async await from image test --- plugins/image/tests/image.test.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/image/tests/image.test.js b/plugins/image/tests/image.test.js index 44afd4fc..3836b449 100644 --- a/plugins/image/tests/image.test.js +++ b/plugins/image/tests/image.test.js @@ -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() + }) }) })