Backstage
    Preparing search index...

    Options for MockDirectory.content.

    interface MockDirectoryContentOptions {
        path?: string;
        shouldReadAsText?: boolean | ((path: string, buffer: Buffer) => boolean);
    }
    Index

    Properties

    path?: string

    The path to read content from. Defaults to the root of the mock directory.

    An absolute path can also be provided, as long as it is a child path of the mock directory.

    shouldReadAsText?: boolean | ((path: string, buffer: Buffer) => boolean)

    Whether or not to return files as text rather than buffers.

    Defaults to checking the file extension against a list of known text extensions.