]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/setupJest.ts
646213554841a016248bf073ce0f968c46049b4f
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / setupJest.ts
1 import '@angular/localize/init';
2
3 import 'jest-preset-angular/setup-jest';
4
5 import './jestGlobalMocks';
6
7 import { TextEncoder, TextDecoder } from 'util';
8
9 Object.assign(global, { TextDecoder, TextEncoder });
10
11 process.on('unhandledRejection', (error) => {
12 const stack = error['stack'] || '';
13 // Avoid potential hang on test failure when running tests in parallel.
14 throw `WARNING: unhandled rejection: ${error} ${stack}`;
15 });