Debian Codegraph @

test/object/ensure-promise.js

raw symbols SCIP
1 "use strict";
2
3 module.exports = function (t, a) {
4 var promise;
5 a.throws(function () { t(); }, TypeError);
6 a.throws(function () { t(null); }, TypeError);
7 a.throws(function () { t("promise"); }, TypeError);
8 a.throws(function () { t({}); }, TypeError);
9 a.throws(function () {
10 t(function () {});
11 }, TypeError);
12 a.throws(function () { t({ then: {} }); }, TypeError);
13 promise = { then: function () {} };
14 a(t(promise), promise);
15 promise = function () {};
16 promise.then = {};
17 a.throws(function () { t(promise); }, TypeError);
18 promise.then = function () {};
19 a(t(promise), promise);
20 };