mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
* Unify version of Jest in subpackages * Upgrade @types/jest * Update jest and jest-watch-typeahead * Add nock and node-fetch to client package * Update snapshots for new version of Jest * Replace renamed test assertions * Update more snapshots * Update type definitions to fix dependency install issues * Re-add --coverage to CI tests * Revert "Re-add --coverage to CI tests" This reverts commit b59a66eb09ccbafa88571631a6a6ef21d4967567. * Update snapshots in components package * Remove nock.disableNetConnect from Client4 tests * Standardize how we mock fetch in different test environments * Add --forceExit and --verbose to test-ci * Try --no-watchAll?
9 lines
358 B
TypeScript
9 lines
358 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import nodeFetch from 'node-fetch';
|
|
|
|
// Nock 13 can't mock Node's built-in fetch, so we have to replace the it with node-fetch to be able to mock it despite
|
|
// some mismatched parameters.
|
|
globalThis.fetch = nodeFetch as unknown as typeof fetch;
|