All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.tests.MockedD3.d.ts Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

There is a newer version: 11.4.0
Show newest version
/**
 * This is a mocked/stubbed version of the d3 Selection type. Each of the main functions are all
 * mocked (via vi.fn()) so you can track if they have been called, etc.
 *
 * Note that node() returns a HTML Element with tag 'svg'. It is an empty element (no innerHTML, no children, etc).
 * This potentially allows testing of mermaidAPI render().
 */
export declare class MockedD3 {
    attribs: Map;
    id: string | undefined;
    _children: MockedD3[];
    _containingHTMLdoc: Document;
    constructor(givenId?: string);
    /** Helpful utility during development/debugging. This is not a real d3 function */
    listChildren(): string;
    select: import("vitest").Mock;
    selectAll: import("vitest").Mock;
    append: import("vitest").Mock;
    insert: (type: string, beforeSelector?: string, id?: string) => MockedD3;
    attr(attrName: string): undefined | string;
    attr(attrName: string, attrValue: string): MockedD3;
    lower(attrValue?: string): this;
    style(attrValue?: string): this;
    text(attrValue?: string): this;
    node: import("vitest").Mock;
    nodes: import("vitest").Mock;
    getBBox: () => {
        x: string | number | undefined;
        y: string | number | undefined;
        width: string | number | undefined;
        height: string | number | undefined;
    };
    insertBefore: import("vitest").Mock;
    curveBasis: import("vitest").Mock;
    curveBasisClosed: import("vitest").Mock;
    curveBasisOpen: import("vitest").Mock;
    curveLinear: import("vitest").Mock;
    curveLinearClosed: import("vitest").Mock;
    curveMonotoneX: import("vitest").Mock;
    curveMonotoneY: import("vitest").Mock;
    curveNatural: import("vitest").Mock;
    curveStep: import("vitest").Mock;
    curveStepAfter: import("vitest").Mock;
    curveStepBefore: import("vitest").Mock;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy