You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
412 B
22 lines
412 B
3 years ago
|
'use strict';
|
||
|
|
||
|
var test = require('tape');
|
||
|
|
||
|
var runTests = require('./tests');
|
||
|
|
||
|
test('implementation', function (t) {
|
||
|
/* eslint global-require: 1 */
|
||
|
if (typeof Promise === 'function') {
|
||
|
var promisify = require('../implementation');
|
||
|
runTests(promisify, t);
|
||
|
} else {
|
||
|
t['throws'](
|
||
|
function () { require('../implementation'); },
|
||
|
TypeError,
|
||
|
'throws when no Promise available'
|
||
|
);
|
||
|
}
|
||
|
|
||
|
t.end();
|
||
|
});
|