"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
const node_assert_1 = require("node:assert");
const mergeTreeNodes_js_1 = require("../mergeTreeNodes.js");
const ops_js_1 = require("../ops.js");
const textSegment_js_1 = require("../textSegment.js");
const testClient_js_1 = require("./testClient.js");
describe("TestClient", () => {
    const localUserLongId = "localUser";
    let client;
    beforeEach(() => {
        client = new testClient_js_1.TestClient();
        client.mergeTree.insertSegments(0, [textSegment_js_1.TextSegment.make("")], client.mergeTree.localPerspective, client.mergeTree.collabWindow.mintNextLocalOperationStamp(), undefined);
        client.startOrUpdateCollaboration(localUserLongId);
    });
    describe(".annotateMarker", () => {
        it("annotate valid marker", () => {
            const insertOp = client.insertMarkerLocal(0, ops_js_1.ReferenceType.Tile, {
                [mergeTreeNodes_js_1.reservedMarkerIdKey]: "123",
            });
            (0, node_assert_1.strict)(insertOp);
            const markerInfo = client.getContainingSegment(0);
            const marker = markerInfo?.segment;
            const annotateOp = client.annotateMarker(marker, { foo: "bar" });
            (0, node_assert_1.strict)(annotateOp);
            (0, node_assert_1.strict)(marker.properties);
            (0, node_assert_1.strict)(marker.properties.foo, "bar");
        });
    });
});
//# sourceMappingURL=client.annotateMarker.spec.js.map