e10eabe30b
Also pin all web/multinode dependencies, which was missing from the other change. Change-Id: Id78749076af6d80e59949efd73c1e10f5b52589c
14 lines
528 B
TypeScript
14 lines
528 B
TypeScript
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
import { GlobalWithFetchMock } from 'jest-fetch-mock';
|
|
|
|
const customGlobal = (global as unknown) as
|
|
(GlobalWithFetchMock & { console: Record<any,unknown> });
|
|
|
|
customGlobal.fetch = require('jest-fetch-mock');
|
|
customGlobal.fetchMock = customGlobal.fetch;
|
|
|
|
// Disallow warnings and errors from console.
|
|
customGlobal.console.warn = (message) => { throw new Error(message); };
|
|
customGlobal.console.error = (message) => { throw new Error(message); }; |