Providers
Emulator helpers
Reading what the app did at a provider, or acting as a provider's user.
Read what the app did at a provider, or act as a provider's user, from a test or an invariant.
gmailMail
function
gmailMail(emulator: Pick<Emulator, "store" | "outbox">): MailSourceMail delivered to a Gmail mailbox of the Google emulator.
outlookMail
function
outlookMail(emulator: Pick<Emulator, "store" | "outbox">): MailSourceMail delivered to an Outlook mailbox of the Microsoft emulator.
resendMail
function
resendMail(emulator: Pick<Emulator, "store">): MailSourceMail the Resend emulator accepted from the app.
twilioSms
function
twilioSms(emulator: Pick<Emulator, "store">): MailSourceTexts the Twilio emulator sent to phones, by the app or by Verify, read like mail: the address is the phone number, so read_mail, mail.code(phone) and the recording of a typed code work for SMS just as for email, and a replay reads the new code from the new phone's texts.
auth0OtpAt
function
otpAt(secret: string, time: Date): stringThe one-time code an authenticator app shows for secret at time.
auth0Tenant
function
auth0Tenant(emulator: Pick<Emulator, "store">, domain?: string): Auth0TenantWhat domain's tenant holds and has done; the first tenant when no domain is given.
flutterwaveBank
function
flutterwaveBank(emulator: Pick<Emulator, "store" | "outbox">): FlutterwaveBankMoney arriving at a Flutterwave emulator's virtual accounts.
flutterwaveLedger
function
flutterwaveLedger(emulator: Pick<Emulator, "store" | "outbox">): FlutterwaveLedgerThe books of a Flutterwave emulator.
githubAppKey
function
githubAppKey(emulator: Pick<Emulator, "store">, slug: string): stringThe private key (PEM) of a seeded GitHub App, for signing its JWTs.
githubRepo
function
githubRepo(emulator: Pick<Emulator, "store">, fullName: string): GithubRepoViewReads a repository's issues, comments, check runs and files from a GitHub emulator.
githubSignIns
function
githubSignIns(emulator: Pick<Emulator, "store">): SignInsWho signed in to which OAuth App or GitHub App, for tests.
gmailMailbox
function
gmailMailbox( emulator: Pick<Emulator, "store" | "outbox">, email: string, ): GmailMailboxReads and changes email's Gmail mailbox from a test.
googleCalendar
function
googleCalendar( emulator: Pick<Emulator, "store" | "outbox">, email: string, ): GoogleCalendarA user's Google Calendar in the emulator: read events, and change them as if from elsewhere.
googleDrive
function
googleDrive( emulator: Pick<Emulator, "store" | "outbox">, email: string, ): GoogleDriveA user's Google Drive in the emulator: read files, and change them as if from elsewhere.
googleSignIns
function
googleSignIns(emulator: Pick<Emulator, "store">): SignInsWho signed in to which client, for tests.
graphSubscriptions
function
graphSubscriptions(emulator: Pick<Emulator, "store">): GraphSubscriptionEntry[]The subscriptions apps have made in a Microsoft emulator, live or expired.
installGithubApp
function
installGithubApp( emulator: Pick<Emulator, "store" | "outbox">, installation: GithubSeedInstallation, ): numberInstalls a seeded app on an account, as a person would on github.com, and sends the app its installation created webhook. Returns the installation id.
listeningPort
function
listeningPort(server: Server): numberThe TCP port a listening server is bound to. Throws when the server is not listening yet, or is bound to a pipe or socket path rather than a port.
microsoftSignIns
function
microsoftSignIns(emulator: Pick<Emulator, "store">): SignInsWho signed in to which app, for tests.
llmCalls
function
llmCalls(emulator: Emulator): LlmCallsThe calls the app made to OpenAI, Anthropic and the AI Gateway, oldest first.
llmScripts
function
llmScripts(emulator: Emulator): LlmScriptsScripts a test adds to the model API emulator while it runs.
oneDrive
function
oneDrive(emulator: Pick<Emulator, "store" | "outbox">, email: string): OneDriveOne user's OneDrive in a Microsoft emulator.
outlookCalendar
function
outlookCalendar( emulator: Pick<Emulator, "store" | "outbox">, email: string, ): OutlookCalendarOne user's Outlook calendar in a Microsoft emulator.
outlookMailbox
function
outlookMailbox( emulator: Pick<Emulator, "store" | "outbox">, email: string, ): OutlookMailboxOne user's Outlook mailbox in a Microsoft emulator.
paystackBank
function
paystackBank(emulator: Pick<Emulator, "store" | "outbox">): PaystackBankA test's stand-in for a customer's bank, for paying into dedicated accounts.
paystackLedger
function
paystackLedger(emulator: Pick<Emulator, "store">): PaystackLedgerReads back what a Paystack emulator holds: transactions, transfers, refunds, customers, subscriptions.
revokeGoogleAccess
function
revokeGoogleAccess( emulator: Pick<Emulator, "store">, email: string, clientId?: string, ): voidRemoves the app's access as the user would from their Google Account: every token email holds for clientId (or for every client) is revoked, so API calls get 401 and refreshes get invalid_grant.
revokeMicrosoftSessions
function
revokeMicrosoftSessions(emulator: Pick<Emulator, "store">, email: string): numberSigns a user out of every app, as when they change their password or an admin revokes their sessions: refresh tokens fail with invalid_grant and Graph refuses their access tokens.
resendInbox
function
resendInbox(emulator: Pick<Emulator, "store">): ResendInboxWhat the Resend emulator accepted, read the way a test reads a mailbox.
s3Objects
function
s3Objects(emulator: Pick<Emulator, "store">): S3ObjectsWhat the S3 emulator holds, read the way a test inspects a bucket.
slackWorkspace
function
slackWorkspace(emulator: Pick<Emulator, "store" | "outbox">): SlackWorkspaceThe workspace of a Slack emulator, for tests.
twilioInbox
function
twilioInbox(emulator: Pick<Emulator, "store">): TwilioInboxThe texts the Twilio emulator sent to phones, read the way a test reads a phone.
twilioPhone
function
twilioPhone(emulator: Pick<Emulator, "store" | "outbox">): TwilioPhoneA phone texting the app's Twilio numbers, as a person would.
uninstallGithubApp
function
uninstallGithubApp( emulator: Pick<Emulator, "store" | "outbox">, installationId: number, ): voidRemoves an installation and sends the app its installation deleted webhook.
bachsLedger
function
bachsLedger(emulator: Emulator): BachsLedgerReads and drives a Bachs emulator from a test.
composioProject
function
composioProject(emulator: Pick<Emulator, "store" | "outbox">): ComposioProjectThe project a Composio emulator stands in for: its accounts, tool runs, triggers and expiries.
composioTools
function
composioTools(emulator: Pick<Emulator, "store">): ComposioToolsThe tool handlers of a Composio emulator, to answer tools from test code. A reset or restore drops them, so one test's handlers never answer the next test's calls.
nangoProject
function
nangoProject(emulator: Emulator): NangoProjectThe Nango environment an emulator stands in for.
nylasApplication
function
nylasApplication(emulator: Emulator): NylasApplicationThe Nylas application an emulator stands in for, for tests to read and act on.
unipileWorkspace
function
unipileWorkspace(emulator: Emulator): UnipileWorkspaceThe Unipile workspace an emulator stands in for.
novuProject
function
novuProject(emulator: Pick<Emulator, "store">): NovuProjectA Novu emulator's project: subscribers, workflow runs, messages sent and open Inboxes.
pusherBeams
function
pusherBeams(emulator: Pick<Emulator, "store">): PusherBeamsThe Beams side of a Pusher emulator: notifications published, and the devices registered.
pusherChannels
function
pusherChannels(emulator: Pick<Emulator, "store">): PusherChannelsThe Channels side of a Pusher emulator: published events, live connections, test triggers.
tiptapCollab
function
tiptapCollab(emulator: Pick<Emulator, "store">): TiptapCollabViewA Tiptap emulator's documents as JSON or text, who is editing them, and their faults.
clerkMail
function
clerkMail(emulator: Pick<Emulator, "store">): MailSourceEmails the Clerk emulator sent: sign-in and sign-up verification codes, read like any mail, so mail.code(email) and a recorded typed code work for Clerk's <SignIn/> and Account Portal.
clerkInstance
function
clerkInstance(emulator: Pick<Emulator, "store">): ClerkInstanceViewThe Clerk emulator's instance, users, sessions and sent codes, for tests.
stableClerkId
function
stableClerkId(prefix: string, name: string): stringA Clerk-style id derived from name, the same on every run and after every reset, e.g. stableClerkId("user", "ada@example.com"): seeded records keep the ids an app's own database was seeded with.