Sha256: ac867f54092fbd624cfc4f039d95b20bedd5867020a488aa196178fc88804835
Contents?: true
Size: 536 Bytes
Versions: 29
Compression:
Stored size: 536 Bytes
Contents
"use strict"; var assert = require("chai").assert , ensurePromise = require("../../promise/ensure"); describe("promise/ensure", function () { it("Should return input value", function () { var value = Promise.resolve(); assert.equal(ensurePromise(value), value); }); it("Should crash on no value", function () { try { ensurePromise({}); throw new Error("Unexpected"); } catch (error) { assert.equal(error.name, "TypeError"); assert.equal(error.message, "[object Object] is not a promise"); } }); });
Version data entries
29 entries across 29 versions & 2 rubygems