/** * @module space-respec-helper contains respec factory functions that are * designed to help ensure common functionality across all spaces. * * Individual space respecs should call these in their own respec files. * * In order to get them to short-circuit (only run/report these respecs), the * calling space respec file should enclose them in a respecfullyDear block. * * ## note on maam, sir, etc. respec titles * * since this file is designed for the caller to have context, the titles (maam, * sir, etc.) used in calling the respec functions are delegated to the caller. */ import { IbGibSpaceAny } from "./space-base-v1.mjs"; export interface CommonSpaceSpecOptions { /** * sir, maam, whatever the title is */ respecfulTitle: string; /** @optional additional description label for testing */ desc?: string; /** * expression to get the initial data when constructing the space */ fnGetInitialSpaceData: () => Promise; /** * expression to get the initial rel8ns when constructing the space */ fnGetInitialSpaceRel8ns: () => Promise; /** * expression to get the space, used in a `beforeEach` call * @param initialData passed into ctor of space * @param initialRel8ns passed into ctor of space * @returns space instance */ fnGetSpace: (initialData: any, initialRel8ns: any) => Promise; /** * if true, will use `fit` to short-circuit testing. */ shortcircuitRespec?: boolean; fnBeforeEach?: () => Promise; fnAfterEach?: () => Promise; /** * @optional flag to use verbose logging at this level. */ logalot?: boolean; } /** * Executes tests related to: * * space creation * `await space.initialized` * space ib related (`getSpaceIb` & `parseSpaceIb`) * * run tests on an ibgib space that are common to all/most spaces. * * So, we can run these against any space, inner, outer, local ionic/filesystem based, etc. * * NOTE: Be sure to await these tests. */ export declare function testSpace_createAndInit({ respecfulTitle: sir, desc, fnGetInitialSpaceData, fnGetInitialSpaceRel8ns, fnGetSpace, shortcircuitRespec, fnBeforeEach, fnAfterEach, }: CommonSpaceSpecOptions): Promise; /** * Executes tests related to: * * `putInSpace` * `getFromSpace` * `deleteFromSpace` * * run tests on an ibgib space that are common to all/most spaces. * * So, we can run these against any space, inner, outer, local ionic/filesystem based, etc. * * NOTE: Be sure to await these tests. */ export declare function testSpace_putGetDelete({ respecfulTitle: sir, logalot, desc, fnGetInitialSpaceData, fnGetInitialSpaceRel8ns, fnGetSpace, shortcircuitRespec, fnBeforeEach, fnAfterEach, }: CommonSpaceSpecOptions): Promise; /** * Executes tests related to: * * `persistTransformResult` * * run tests on an ibgib space that are common to all/most spaces. * * So, we can run these against any space, inner, outer, local ionic/filesystem based, etc. * * NOTE: Be sure to await these tests. */ export declare function testSpace_persistTransformResult({ respecfulTitle: sir, logalot, desc, fnGetInitialSpaceData, fnGetInitialSpaceRel8ns, fnGetSpace, shortcircuitRespec, }: CommonSpaceSpecOptions): Promise; /** * Executes tests related to: * * `persistTransformResult` * `registerNewIbGib` * `getLatestAddrs` * * run tests on an ibgib space that are common to all/most spaces. * * So, we can run these against any space, inner, outer, local ionic/filesystem based, etc. * * NOTE: Be sure to await these tests. */ export declare function testSpace_registerNewIbGib_GetLatest({ respecfulTitle: sir, desc, fnGetInitialSpaceData, fnGetInitialSpaceRel8ns, fnGetSpace, shortcircuitRespec, logalot, testLatestIterations, }: CommonSpaceSpecOptions & { /** * number of iterations to ibGib > mut8 > registerNewIbGib. * After each `registerNewIbGib` call, will check the broadcast count, as well * as a getLatestAddr check. */ testLatestIterations: number; }): Promise; //# sourceMappingURL=space-respec-helper.d.mts.map