UNPKG

@algodex/algodex-sdk

Version:

API calls for interacting with the Algorand blockchain

16 lines (14 loc) 461 B
const Environment = require('jest-environment-jsdom'); /** * A custom environment to set the TextEncoder that is required by TensorFlow.js. */ module.exports = class CustomTestEnvironment extends Environment { // eslint-disable-next-line require-jsdoc async setup() { await super.setup(); if (typeof this.global.TextEncoder === 'undefined') { const {TextEncoder} = require('util'); this.global.TextEncoder = TextEncoder; } } };