/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
// Allow importing from this specific file which is being tested:
// eslint-disable-next-line import/no-internal-modules
import { buildChunkedForest } from "../../../feature-libraries/chunked-forest/chunkedForest.js";
import { makeTreeChunker, Chunker, polymorphic, defaultChunkPolicy, tryShapeFromSchema,
// eslint-disable-next-line import/no-internal-modules
 } from "../../../feature-libraries/chunked-forest/chunkTree.js";
import { defaultSchemaPolicy } from "../../../feature-libraries/index.js";
import { testForest } from "../../forestTestSuite.js";
const chunkers = [
    [
        "basic",
        (schema) => new Chunker(schema, defaultSchemaPolicy, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, 0, () => polymorphic),
    ],
    ["default", (schema) => makeTreeChunker(schema, defaultSchemaPolicy)],
    [
        "sequences",
        (schema) => new Chunker(schema, defaultSchemaPolicy, 2, 1, 0, () => polymorphic),
    ],
    [
        "minimal-uniform",
        (schema) => new Chunker(schema, defaultSchemaPolicy, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, 1, tryShapeFromSchema),
    ],
    [
        "uniform",
        (schema) => new Chunker(schema, defaultSchemaPolicy, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, defaultChunkPolicy.uniformChunkNodeCount, tryShapeFromSchema),
    ],
    [
        "mixed",
        (schema) => new Chunker(schema, defaultSchemaPolicy, 2, 1, defaultChunkPolicy.uniformChunkNodeCount, tryShapeFromSchema),
    ],
];
describe("ChunkedForest", () => {
    for (const [name, chunker] of chunkers) {
        describe(name, () => {
            testForest({
                suiteName: "ChunkedForest forest suite",
                factory: (schema) => buildChunkedForest(chunker(schema)),
                skipCursorErrorCheck: true,
            });
        });
    }
});
//# sourceMappingURL=chunkedForest.spec.js.map