nodejs-hands-on/templates/basic/toEqual.test.js

9 lines
293 B
JavaScript
Raw Normal View History

2023-12-19 16:50:59 +09:00
import assert from "node:assert";
import test from "node:test";
test("Object.assign()でプロパティを代入できる", () => {
const data = { name: "Claude Monet" };
Object.assign(data, { birth: "1840" });
assert.deepStrictEqual(data, { name: "Claude Monet", birth: "1840" });
});