0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/integration-tests/jest.setup.js
Charles Zhao 91d1bf8004
fix: downgrade to sdk 1.0.0-beta.2 (#1896)
fix(console,demo-app): downgrade js sdk version to 1.0.0-beta.2 to avoid sign-in issues

This reverts commit ac945712e6, reversing
changes made to c97d8610d9.
2022-09-07 22:31:49 +08:00

19 lines
615 B
JavaScript

// Need to disable following rules to mock text-decode/text-encoder and crypto for jsdom
// https://github.com/jsdom/jsdom/issues/1612
import { Crypto } from '@peculiar/webcrypto';
import dotenv from 'dotenv';
import { TextDecoder, TextEncoder } from 'text-encoder';
// eslint-disable-next-line unicorn/prefer-module
const fetch = require('node-fetch');
dotenv.config();
/* eslint-disable @silverhand/fp/no-mutation */
global.crypto = new Crypto();
global.fetch = fetch;
global.TextDecoder = TextDecoder;
global.TextEncoder = TextEncoder;
/* eslint-enable @silverhand/fp/no-mutation */
jest.setTimeout(10_000);