All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.test.test.js Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version

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