aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/test/object/ensure-thenable.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es5-ext/test/object/ensure-thenable.js')
-rw-r--r--node_modules/es5-ext/test/object/ensure-thenable.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/node_modules/es5-ext/test/object/ensure-thenable.js b/node_modules/es5-ext/test/object/ensure-thenable.js
new file mode 100644
index 00000000..151238ba
--- /dev/null
+++ b/node_modules/es5-ext/test/object/ensure-thenable.js
@@ -0,0 +1,11 @@
+"use strict";
+
+module.exports = function (t, a) {
+ // Just sanity checks as proper tests are at isThenable
+ var thenable = { then: function () {} };
+
+ a.throws(function () {
+ t({});
+ }, TypeError);
+ a(t(thenable), thenable);
+};