diff --git a/src/index.test.ts b/src/index.test.ts index 4f1e0f6..c0ead48 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,6 +1,10 @@ import { Client, MCEvent } from '@managed-components/types' import { vi, describe, it, expect, beforeEach } from 'vitest' import { onEvent } from '.' +import crypto from 'crypto' +if (!global.crypto) { + vi.stubGlobal('crypto', crypto) +} describe('Twitter Analytics MC', () => { let mockClient: Client