mirror of
https://github.com/mattermost/mattermost.git
synced 2026-02-03 20:40:00 -05: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 b59a66eb09.
* 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?
8 lines
358 B
TypeScript
8 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;
|