/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
/// <reference types="mocha" resolution-mode="require"/>
import { FlexFieldSchema } from "../feature-libraries/index.js";
import { FieldKey, JsonableTree, ITreeCursor, UpPath, FieldUpPath } from "../core/index.js";
export declare const emptySchema: import("../feature-libraries/index.js").FlexObjectNodeSchema<"Cursor Test Suite.Empty object", {}>;
export declare const mapSchema: import("../feature-libraries/index.js").FlexMapNodeSchema<"Cursor Test Suite.Map", FlexFieldSchema<import("../feature-libraries/index.js").Sequence, readonly ["Any"]>>;
export declare const objectSchema: import("../feature-libraries/index.js").FlexObjectNodeSchema<"Cursor Test Suite.object", {
    readonly child: FlexFieldSchema<import("../feature-libraries/index.js").Required, readonly [import("../feature-libraries/index.js").LeafNodeSchema<"com.fluidframework.leaf.number", import("../core/index.js").ValueSchema.Number>]>;
}>;
export declare const testTreeSchema: import("../feature-libraries/index.js").FlexTreeSchema<FlexFieldSchema<import("../feature-libraries/index.js").Sequence, readonly ["Any"]>>;
export declare const testTrees: readonly (readonly [string, JsonableTree])[];
/**
 * Tests a cursor implementation.
 * This test suite has a built in set of test cases (based on `testTrees`), so the provided cursor implementation must support all tree contents
 * (not just some specific domain).
 * More specialized cursor implementations should use `testTreeCursor` instead.
 *
 * @param cursorName - The name of the cursor used as part of the test suite name.
 * @param cursorFactory - Creates the cursor to be tested from the provided `TData`.
 * @param dataFromCursor - Constructs a `TData` from the provided cursor (which might not be a `TCursor`).
 * @param extraRoot - setting this to `true` makes the tests expect that `cursorFactory` includes a dummy node above the root,
 * with the data under {@link rootFieldKey}.
 *
 * @typeParam TData - Format which the cursor reads. Must be JSON compatible.
 * @typeParam TCursor - Type of the cursor being tested.
 */
export declare function testGeneralPurposeTreeCursor<TData, TCursor extends ITreeCursor>(cursorName: string, cursorFactory: (data: TData) => TCursor, dataFromCursor: (cursor: ITreeCursor) => TData, extraRoot?: true): void;
/**
 * Collection of builders for special cases.
 */
export interface SpecialCaseBuilder<TData> {
    /**
     * Build data for a tree which has the provided keys on its root node.
     * The content of the tree under these keys is arbitrary and up to the implementation.
     */
    withKeys?(keys: FieldKey[]): TData;
}
export interface TestTree<TData> {
    readonly name: string;
    readonly dataFactory: () => TData;
    readonly reference?: JsonableTree;
    readonly path?: UpPath;
}
export interface TestField<TData> {
    readonly name: string;
    readonly dataFactory: () => TData;
    readonly reference: JsonableTree[];
    readonly path: FieldUpPath;
}
/**
 * Tests a cursor implementation that is rooted at a node.
 * Prefer using `testGeneralPurposeTreeCursor` when possible:
 * `testTreeCursor` should only be used when testing a cursor that is not truly general purpose (can not be build from any arbitrary tree).
 *
 * @param cursorName - The name of the cursor used as part of the test suite name.
 * @param builders - a collection of optional `TData` builders. The more of these are provided, the larger the test suite will be.
 * If provided with a JsonableTree, it will either be from testData or comply with testTreeSchema.
 * @param cursorFactory - Creates the cursor to be tested from the provided `TData`.
 * @param dataFromCursor - Constructs a `TData` from the provided cursor (which might not be a `TCursor`).
 * @param testData - A collection of test cases to evaluate the cursor with. Actual content of the tree is only validated if a `reference` is provided:
 * otherwise only basic traversal and API consistency will be checked.
 *
 * @typeParam TData - Format which the cursor reads. Must be JSON compatible.
 * @typeParam TCursor - Type of the cursor being tested.
 */
export declare function testSpecializedCursor<TData, TCursor extends ITreeCursor>(config: {
    cursorName: string;
    builders: SpecialCaseBuilder<TData>;
    cursorFactory: (data: TData) => TCursor;
    dataFromCursor?: (cursor: ITreeCursor) => TData;
    testData: readonly TestTree<TData>[];
}): Mocha.Suite;
/**
 * Tests a cursor implementation that is rooted at a field.
 * Prefer using `testGeneralPurposeTreeCursor` when possible:
 * `testTreeCursor` should only be used when testing a cursor that is not truly general purpose (cannot be built from any arbitrary tree).
 *
 * @param cursorName - The name of the cursor used as part of the test suite name.
 * @param builders - a collection of optional `TData` builders. The more of these are provided, the larger the test suite will be.
 * If provided with a JsonableTree, it will either be from testData or comply with testTreeSchema.
 * @param cursorFactory - Creates the cursor to be tested from the provided `TData`.
 * @param dataFromCursor - Constructs a `TData` from the provided cursor (which might not be a `TCursor`).
 * @param testData - A collection of test cases to evaluate the cursor with. Actual content of the tree is only validated if a `reference` is provided:
 * otherwise only basic traversal and API consistency will be checked.
 *
 * @typeParam TData - Format which the cursor reads. Must be JSON compatible.
 * @typeParam TCursor - Type of the cursor being tested.
 */
export declare function testSpecializedFieldCursor<TData, TCursor extends ITreeCursor>(config: {
    cursorName: string;
    builders: SpecialCaseBuilder<TData>;
    cursorFactory: (data: TData) => TCursor;
    dataFromCursor?: (cursor: ITreeCursor) => TData;
    testData: readonly TestField<TData>[];
}): Mocha.Suite;
/**
 * Test that cursor works as a cursor, starting in `Fields` mode.
 *
 * This does NOT test that the data the cursor exposes is correct,
 * it simply checks that the traversal APIs function, and that a few aspects of them conform with the spec.
 */
export declare function checkFieldTraversal(cursor: ITreeCursor, expectedPath: FieldUpPath): void;
//# sourceMappingURL=cursorTestSuite.d.ts.map