Skip to content

Commit

Permalink
test: added missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Gerig committed Jul 17, 2019
1 parent c16ae01 commit 75074e1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
const test = require('tape')
const loadYumpuAPI = require('./')
import test from 'tape'
import loadYumpuApi from './'

test('resolves the promise to the `Yumpu` object with support for duplicate calls', function (t) {
test('resolves the promise to the `Yumpu` object', function (t) {
t.plan(1)

loadYumpuApi().then(function (Yumpu) {
t.true(typeof Yumpu === 'function')
}, t.fail)
})

test('resolves the promise to the `Yumpu` object, with support for duplicate calls', function (t) {
t.plan(2)

const promises = [loadYumpuAPI(), loadYumpuAPI()]
const promises = [loadYumpuApi(), loadYumpuApi()]

Promise.all(promises).then(function (values) {
t.equal(values[0], values[1])
Expand Down

0 comments on commit 75074e1

Please sign in to comment.