ci: Block all external network calls in tests (no-changelog) (#4930)

* setup nock to prevent tests from making any external requests

* mock all calls to posthog sdk
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-12-14 15:28:41 +01:00
committed by GitHub
parent 2964458191
commit d5b06ab3d6
5 changed files with 29 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
import { Telemetry } from '@/telemetry';
import config from '@/config';
jest.mock('posthog-node');
jest.spyOn(Telemetry.prototype as any, 'initRudderStack').mockImplementation(() => {
return {
flush: () => {},