Coming Soon

A first-in-class Time-traveling Test SDK for customer journeys. Catch regressions in our messaging automation in CI, before code gets deployed to production.

Check out a sample jest test for a React component.

src/bookmarkButton.test.tsx
describe("When the bookmark button is clicked", () => {
  let df: DittofeedTestEnv;

  beforeEach(async () => {
    df = await Dittofeed.setupTestEnv();
    ...
  })

  it("Emails the clicking user", async () => {
    render(<BookmarkButton/>)
    fireEvent.click(screen.getByText(/bookmark/i))

    // Using simulated time.
    await df.sleep("1 week");
    const messages = await df.fetchMessages();

    expect(messages).toEqual([
      expect.objectContaining({
        to: "[email protected]",
        type: "Email",
        body: expect.stringContaining("https://app.com/user-1/bookmarks")
        ...
      });
    ]);
  });
});