diff --git a/package.json b/package.json index b77ae3c..fdbc6fc 100644 --- a/package.json +++ b/package.json @@ -33,5 +33,8 @@ "LICENSE", "index.js", "index.d.ts" - ] -} \ No newline at end of file + ], + "engines": { + "node": ">=10" + } +} diff --git a/test/index.js b/test/index.js index 78c2cab..d6e3b3d 100644 --- a/test/index.js +++ b/test/index.js @@ -34,11 +34,15 @@ test ('try_parse_json should fail', (t) => { }); test ('copy object', (t) => { - const obj = { foo: 'bar' }; + const obj = { foo: 'bar', bar: { foo: 'baz' } }; const copy = util.copy_object (obj); + t.deepEqual (obj, copy); copy.foo = 'baz'; + copy.bar.foo = 'bar'; t.is (copy.foo, 'baz'); + t.is (copy.bar.foo, 'bar'); t.is (obj.foo, 'bar'); + t.is (obj.bar.foo, 'baz'); }); test ('run regex', (t) => {