
package.test.test.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of native-or-bluebird Show documentation
Show all versions of native-or-bluebird Show documentation
use either the native Promise or Bluebird
var assert = require('assert')
var Promise
describe('require("native-or-bluebird")', function () {
it('should return a Promise implementation', function () {
Promise = require('..')
return new Promise(function (resolve) {
resolve(1)
}).then(function (val) {
assert.equal(val, 1)
})
})
})
describe('require("native-or-bluebird/promise")', function () {
it('should return a Promise implementation', function () {
Promise = require('../promise')
return new Promise(function (resolve) {
resolve(1)
}).then(function (val) {
assert.equal(val, 1)
})
})
})
© 2015 - 2025 Weber Informatics LLC | Privacy Policy