@bluelibs/runner - v5.5.0
    Preparing search index...

    Function createTestResource

    • Helper to create a minimal test harness resource that wraps a root app (or any registerable) and exposes convenient testing utilities while running the full ecosystem (registration, overrides, middleware, events) without modifying the core API.

      Parameters

      • root: RegisterableItems
      • Optionaloptions: {
            overrides?: (
                | IResourceMiddleware<any, void, void, any>
                | IResourceWithConfig<
                    any,
                    Promise<any>,
                    any,
                    any,
                    any,
                    TagType[],
                    IResourceMiddleware<any, void, void, any>[],
                >
                | ITask<
                    any,
                    Promise<unknown>,
                    {},
                    any,
                    TagType[],
                    TaskMiddlewareAttachmentType[],
                >
                | IResource<
                    void,
                    Promise<any>,
                    any,
                    any,
                    any,
                    TagType[],
                    ResourceMiddlewareAttachmentType[],
                >
                | ITaskMiddleware<any, void, void, any>
            )[];
        }

      Returns IResource<void, Promise<TestFacade>>

      Use run() in your tests instead, which provides the same benefits with a more flexible API and better type safety.