Basic setup of the project.

This commit is contained in:
2024-08-14 19:40:05 +02:00
parent 0fc0f6ac82
commit 1341427590
12 changed files with 7417 additions and 0 deletions

17
scripts/jest.setup.js Normal file
View File

@@ -0,0 +1,17 @@
// jest.setup.js
const getCircularReplacer = () => {
const seen = new WeakSet();
return (key, value) => {
if (typeof value === 'object' && value !== null) {
if (seen.has(value)) {
return;
}
seen.add(value);
}
return value;
};
};
global.customJSONStringify = (object) => {
return JSON.stringify(object, getCircularReplacer());
};