UNPKG

decentraland-crypto-fetch

Version:

[![Coverage Status](https://coveralls.io/repos/github/decentraland/decentraland-crypto-fetch/badge.svg?branch=main)](https://coveralls.io/github/decentraland/decentraland-crypto-fetch?branch=main)

20 lines 967 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var utils_1 = require("./utils"); describe("src/utils", function () { describe("getImplementation", function () { test("should return implementation if there is any in as option", function () { var Math = jest.fn(); var impl = (0, utils_1.getImplementation)({ Math: Math }, "Math"); expect(impl).toBe(impl); }); test("should return global implementation if there isn't any as option", function () { var impl = (0, utils_1.getImplementation)({}, "Math"); expect(impl).toBe(Math); }); test("should should fail if ther isn't any implementation as options or global", function () { expect(function () { return (0, utils_1.getImplementation)({}, "None"); }).toThrowError(new ReferenceError('"None" is not defined')); }); }); }); //# sourceMappingURL=utils.test.js.map