Skip to content

Commit 62ebd9d

Browse files
committed
Fix gatsby tests
1 parent 2d25f86 commit 62ebd9d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/gatsby/test/integration.test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import { render } from '@testing-library/react';
33
import { useEffect } from 'react';
44
// eslint-disable-next-line @typescript-eslint/no-unused-vars
55
import * as React from 'react';
6+
import { TextEncoder, TextDecoder } from 'util';
67

78
import { onClientEntry } from '../gatsby-browser';
89
import * as Sentry from '../src';
910

1011
beforeAll(() => {
1112
(global as any).__SENTRY_RELEASE__ = '683f3a6ab819d47d23abfca9a914c81f0524d35b';
1213
(global as any).__SENTRY_DSN__ = 'https://[email protected]/0';
14+
(global as any).TextEncoder = TextEncoder;
15+
(global as any).TextDecoder = TextDecoder;
1316
});
1417

1518
describe('useEffect', () => {

0 commit comments

Comments
 (0)