refactor: replace rfdc with native structuredClone

This commit is contained in:
2024-04-03 11:14:47 +02:00
committed by Rainer Killinger
parent 622481a3c9
commit 53c3d0ba0c
13 changed files with 33 additions and 70 deletions

View File

@@ -92,8 +92,8 @@ describe('e2e Connector', function () {
if (
request.url.toString() === `http://localhost${bulkAddRoute.getUrlPath({UID: 'foo'}).toString()}`
) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
storedThings.set((request.body as any).uid, JSON.parse(JSON.stringify(request.body)));
const thing = request.body as SCThings;
storedThings.set(thing.uid, structuredClone(thing));
return {
body: {},
@@ -143,7 +143,6 @@ describe('e2e Connector', function () {
},
);
// tslint:disable-next-line: max-line-length
await e2eRun(httpClient, {
to: 'http://localhost',
samplesLocation: './node_modules/@openstapps/core/test/resources',
@@ -151,7 +150,6 @@ describe('e2e Connector', function () {
failOnLookup = true;
failOnCompare = false;
// tslint:disable-next-line: max-line-length
await e2eRun(httpClient, {
to: 'http://localhost',
samplesLocation: './node_modules/@openstapps/core/test/resources',
@@ -161,7 +159,6 @@ describe('e2e Connector', function () {
failOnLookup = false;
failOnCompare = true;
// tslint:disable-next-line: max-line-length
await e2eRun(httpClient, {
to: 'http://localhost',
samplesLocation: './node_modules/@openstapps/core/test/resources',
@@ -178,7 +175,6 @@ describe('e2e Connector', function () {
};
});
// tslint:disable-next-line: max-line-length
return e2eRun(httpClient, {
to: 'http://localhost',
samplesLocation: './node_modules/@openstapps/core/test/resources',