frontend/.pnpm-store/v3/files/37/868e4c5d7f5c822edaeebbb6e3d23ec2078f2e1228fb98ea37a965be9ab5254a14997e25b59a79e15f5d897f9ca47834899137bf0b521c7c366f1fe55ffc0c

33 lines
626 B
Plaintext

"use strict";
var WeakMapPoly = require("../polyfill");
module.exports = function (t, a) {
var map;
a.throws(function () {
t(undefined);
}, TypeError, "Undefined");
a.throws(function () {
t(null);
}, TypeError, "Null");
a.throws(function () {
t(true);
}, TypeError, "Primitive");
a.throws(function () {
t("raz");
}, TypeError, "String");
a.throws(function () {
t({});
}, TypeError, "Object");
a.throws(function () {
t([]);
}, TypeError, "Array");
if (typeof WeakMap !== "undefined") {
map = new WeakMap();
a(t(map), map, "Native");
}
map = new WeakMapPoly();
a(t(map), map, "Polyfill");
};