]>
git.r.bdr.sh - rbdr/dotfiles/blob - atom/packages/vim-mode/node_modules/grim/node_modules/emissary/node_modules/es6-weak-map/test/valid-weak-map.js
a7823421a7c5039d975c67df0119049fb289d3cd
3 var WeakMapPoly
= require('../polyfill');
5 module
.exports = function (t
, a
) {
7 a
.throws(function () { t(undefined); }, TypeError
, "Undefined");
8 a
.throws(function () { t(null); }, TypeError
, "Null");
9 a
.throws(function () { t(true); }, TypeError
, "Primitive");
10 a
.throws(function () { t('raz'); }, TypeError
, "String");
11 a
.throws(function () { t({}); }, TypeError
, "Object");
12 a
.throws(function () { t([]); }, TypeError
, "Array");
13 if (typeof WeakMap
!== 'undefined') {
15 a(t(map
), map
, "Native");
17 map
= new WeakMapPoly();
18 a(t(map
), map
, "Polyfill");