Skip to content

Commit bde5f50

Browse files
committed
test: reverted structuredClone (not available for Node 16 LTS)
1 parent 06ec097 commit bde5f50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/switcher-watch-snapshot.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assert } from 'chai';
2-
import { writeFileSync, existsSync, mkdirSync, readFileSync, unlinkSync } from 'node:fs';
2+
import { writeFileSync, existsSync, mkdirSync, readFileSync, unlinkSync } from 'fs';
33

44
import { Client } from '../switcher-client.js';
55
import { deleteGeneratedSnapshot, getSwitcherResulUntil } from './helper/utils.js';
@@ -9,7 +9,7 @@ const component = 'business-service';
99
let devJSON;
1010

1111
const updateSwitcher = (environment, status) => {
12-
const copyOfDevJSON = structuredClone(devJSON);
12+
const copyOfDevJSON = JSON.parse(JSON.stringify(devJSON));
1313
copyOfDevJSON.domain.group[0].config[0].activated = status;
1414
writeFileSync(`generated-watch-snapshots/${environment}.json`, JSON.stringify(copyOfDevJSON, null, 4));
1515
};

0 commit comments

Comments
 (0)