You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
const deepClone = require('fast-deepclone');
const assert = require('assert');
describe(`fast-deepclone`, function () {
it(`can deep copy a map`, function () {
const map = new Map();
map.set('key', 'value');
const copiedMap = deepClone(map, true);
assert.notStrictEqual(map, copiedMap, "Variables holding Maps should not reference the same object in memory");
assert.strictEqual(map.size, copiedMap.size, "The cloned Map should have the same size as the original Map");
});
});
This test will fail at the assertion "Variables holding Maps should not reference the same object in memory"