mirror of
https://github.com/kou029w/nodejs-hands-on.git
synced 2025-01-19 00:17:59 +00:00
8 lines
293 B
JavaScript
8 lines
293 B
JavaScript
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" });
|
|
});
|