@kilterset/auth0-actions-testing
Version:
Test and develop Auth0 Actions or Okta CIC Actions locally.
16 lines (12 loc) • 374 B
text/typescript
import { PromptState } from "../../types";
export function promptMock(flow: string) {
const state: { rendered: PromptState | null } = {
rendered: null,
};
const build = <T>(api: T) => ({
render: (promptId: string, promptOptions?: { [key: string]: unknown }) => {
state.rendered = { promptId, promptOptions };
},
});
return { state, build };
}