10 lines
532 B
TypeScript
10 lines
532 B
TypeScript
// اجرا قبل از setupTests.ts (برای polyfill ها)
|
||
import 'whatwg-fetch'; // fetch polyfill for node environment
|
||
// اگر به polyfill های دیگر نیاز دارید، اینجا اضافه کنید.
|
||
// مثال: globalThis.TextEncoder/TextDecoder در بعضی محیطها لازم است:
|
||
if (typeof (globalThis as any).TextEncoder === 'undefined') {
|
||
const { TextEncoder, TextDecoder } = require('util');
|
||
(globalThis as any).TextEncoder = TextEncoder;
|
||
(globalThis as any).TextDecoder = TextDecoder;
|
||
}
|