2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2019-01-08 15:14:00 +00:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
import { GlobalWithFetchMock } from 'jest-fetch-mock';
|
|
|
|
|
|
|
|
const customGlobal: GlobalWithFetchMock = global as GlobalWithFetchMock;
|
|
|
|
|
|
|
|
customGlobal.fetch = require('jest-fetch-mock');
|
|
|
|
customGlobal.fetchMock = customGlobal.fetch;
|
2021-08-31 13:36:31 +01:00
|
|
|
|
|
|
|
// Disallow warnings and errors from console.
|
2021-09-23 22:59:32 +01:00
|
|
|
// customGlobal.console.warn = (message) => { throw new Error(message); };
|
|
|
|
// customGlobal.console.error = (message) => { throw new Error(message); };
|