var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
import { describe, expect, it } from "vitest";
import { mergeDeep } from "../objectUtils";
describe("deepMerge", () => {
    it("can merge two shallow object", () => __awaiter(void 0, void 0, void 0, function* () {
        const object1 = { test1: 1 };
        const object2 = { test2: 2 };
        const merged = mergeDeep(object1, object2);
        expect(merged).toEqual({
            test1: 1,
            test2: 2,
        });
    }));
    it("can merge three shallow objects", () => __awaiter(void 0, void 0, void 0, function* () {
        const object1 = { test1: 1 };
        const object2 = { test2: 2 };
        const object3 = { test3: 3 };
        const merged = mergeDeep(object1, object2, object3);
        expect(merged).toEqual({
            test1: 1,
            test2: 2,
            test3: 3,
        });
    }));
    it("can handle shallow merge conflicts", () => __awaiter(void 0, void 0, void 0, function* () {
        const object1 = { test1: 1 };
        const object2 = { test1: 2 };
        const object3 = { test3: 3 };
        const merged = mergeDeep(object1, object2, object3);
        expect(merged).toEqual({
            test1: 2,
            test3: 3,
        });
    }));
    it("can handle deep merges", () => __awaiter(void 0, void 0, void 0, function* () {
        const object1 = {
            someKey: 1,
            test1: {
                nestedTest1: 1,
            },
        };
        const object2 = {
            test1: {
                nestedTest1: 2,
            },
        };
        const merged = mergeDeep(object1, object2);
        expect(merged).toEqual({
            someKey: 1,
            test1: {
                nestedTest1: 2,
            },
        });
    }));
});
//# sourceMappingURL=objectUtils.test.js.map