get-global.util.spect.js 569 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const _1 = require(".");
  4. describe('getGlobal()', () => {
  5. it('should return true if Buffer is present in globalThis', () => {
  6. expect((0, _1.getGlobal)().Buffer).toBe(true);
  7. });
  8. it('should return false if Buffer is not present in globalThis', () => {
  9. const bufferImp = global.Buffer;
  10. delete global.Buffer;
  11. expect((0, _1.getGlobal)().Buffer).toBe(false);
  12. global.Buffer = bufferImp;
  13. });
  14. });
  15. //# sourceMappingURL=get-global.util.spect.js.map