UNPKG

@inngest/test

Version:
29 lines (28 loc) 910 B
import type { Context } from "inngest/types"; /** * The default context transformation function that mocks all step tools. Use * this in addition to your custom transformation function if you'd like to keep * this functionality. */ export declare const mockCtx: (ctx: Readonly<Context.Any>) => Context.Any; /** * Creates a tiny mock invocation event used to replace or complement given * event data. */ export declare const createMockEvent: () => { id: string; name: string; data: {}; ts: number; }; /** * A deep partial, where every key of every object is optional. */ export type DeepPartial<T> = { [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K]; }; /** * Ensures that all keys in the subset are present in the actual object and that * the values match. */ export declare const isDeeplyEqual: <T extends object>(subset: DeepPartial<T>, actual: T) => boolean;