implementation.js 412 B

123456789101112131415161718192021
  1. 'use strict';
  2. var test = require('tape');
  3. var runTests = require('./tests');
  4. test('implementation', function (t) {
  5. /* eslint global-require: 1 */
  6. if (typeof Promise === 'function') {
  7. var promisify = require('../implementation');
  8. runTests(promisify, t);
  9. } else {
  10. t['throws'](
  11. function () { require('../implementation'); },
  12. TypeError,
  13. 'throws when no Promise available'
  14. );
  15. }
  16. t.end();
  17. });