### Install dependencies Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nextjs-starter/README.md Command to install project dependencies. ```bash npm install ``` -------------------------------- ### Getting Started Commands Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-remix/README.md Commands to install dependencies and start the development server. ```bash pnpm install pnpm dev ``` -------------------------------- ### Quickstart commands Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/tanstack-start-realtime/README.md Commands to install dependencies, start the Inngest dev server, and start the application. ```bash # Install dependencies npm install # Start the Inngest dev server (in a separate terminal) npx inngest-cli@latest dev # Start the app npm run dev # visit localhost:8288 and make sure your localhost:3000 # app is synced. if not sync it. ``` -------------------------------- ### Start the Application Source: https://github.com/inngest/inngest-js/blob/main/examples/durable-endpoints-trip-booker/README.md Commands to start the Next.js development server. ```bash cd next-app npm run dev # Runs on http://localhost:3000 ``` -------------------------------- ### Install Dependencies Source: https://github.com/inngest/inngest-js/blob/main/examples/durable-endpoints-trip-booker/README.md Commands to install project dependencies. ```bash cd next-app npm install ``` -------------------------------- ### Install dependencies Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/next-realtime-hooks/README.md Commands to install dependencies for the example. ```bash cd examples/realtime/next-realtime-hooks npm install ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/examples/bun-sync/README.md Install project dependencies. ```bash bun install ``` -------------------------------- ### Run Next.js development server Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nextjs-starter/README.md Command to start the Next.js development server. ```bash npm run dev ``` -------------------------------- ### Setup commands Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/single-run-subscription/README.md Commands to install dependencies and prepare for local testing of Inngest package changes. ```bash npm install ``` ```bash # From packages/inngest/ pnpm build && pnpm local:pack # From this directory npm install --no-save ../../../packages/inngest/inngest.tgz ``` -------------------------------- ### Navigate and install dependencies Source: https://github.com/inngest/inngest-js/blob/main/examples/nextjs-christmas-dinner-generator-challenge/README.md Commands to change directory to the example project and install its npm dependencies. ```bash cd examples/nextjs-christmas-dinner-generator-challenge npm install ``` -------------------------------- ### Install dependencies Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-tanstack-start/README.md Command to install project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Run locally - Start Inngest Dev Server Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/next-realtime-hooks/README.md Command to start the Inngest Dev Server and sync the Next.js handler. ```bash npx inngest-cli@latest dev -u http://localhost:3001/api/inngest ``` -------------------------------- ### Setup and Prerequisites Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/CLAUDE.md Commands to navigate to the package directory and install dependencies. ```bash # Navigate to the main package\ncd packages/inngest/\n\n# Install dependencies (pnpm is required - enforced by preinstall hook)\npnpm install\n\n# Start development mode (builds + lints + watches)\npnpm dev ``` -------------------------------- ### Run Inngest dev server Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nextjs-starter/README.md Command to start the Inngest development server, pointing to the Next.js API endpoint. ```bash npx inngest-cli@latest dev -u http://localhost:3000/api/inngest ``` -------------------------------- ### Bootstrap the example project Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-sveltekit/README.md Use create-next-app with npm, Yarn, or pnpm to bootstrap the example. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-sveltekit inngest-sveltekit ``` ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-sveltekit inngest-sveltekit ``` ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-sveltekit inngest-sveltekit ``` -------------------------------- ### Clone the repository Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-tanstack-start/README.md Command to clone the Inngest Tanstack Start example repository. ```bash npx gitpick https://github.com/inngest/inngest-js/blob/main/examples/framework-tanstack-start inngest-start ``` -------------------------------- ### Quick start Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/src/components/realtime/README.md An example demonstrating how to declare a channel with typed topics, publish messages from an Inngest function, and subscribe to messages server-side. ```ts import { realtime } from "inngest"; import { z } from "zod"; // 1. Declare a channel with typed topics const agentChat = realtime.channel({ name: ({ threadId }: { threadId: string }) => `agent-chat:${threadId}`, topics: { status: { schema: z.object({ message: z.string(), step: z.string().optional() }) }, tokens: { schema: z.object({ token: z.string() }) } } }); // 2. Publish from an Inngest function const aiChat = inngest.createFunction( { id: "ai-chat" }, { event: "ai/chat.requested" }, async ({ event, step }) => { const chat = agentChat({ threadId: event.data.threadId }); // Non-durable publish via the client await inngest.realtime.publish(chat.status, { message: "Thinking..." }); const response = await step.run("generate", async () => { return llm.generate(event.data.prompt); }); for (const token of response.tokens) { await inngest.realtime.publish(chat.tokens, { token }); } // Durable publish memoized, won't re-fire on retry await step.realtime.publish("done", chat.status, { message: "Done" }); } ); // 3. Subscribe server-side for await (const msg of await inngest.realtime.subscribe({ channel: agentChat({ threadId: "thread_abc" }), topics: ["status", "tokens"] })) { console.log(msg.topic, msg.data); } ``` -------------------------------- ### Copy Environment Example Source: https://github.com/inngest/inngest-js/blob/main/packages/ai/README.md Command to copy the `.env.example` file to `.env` as part of smoke test setup. ```bash cp .env.example .env ``` -------------------------------- ### Start development server Source: https://github.com/inngest/inngest-js/blob/main/examples/bun/README.md Command to start the local development server. ```bash bun dev ``` -------------------------------- ### Bootstrap the example project Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-koa/README.md Use `create-next-app` with npm, Yarn, or pnpm to bootstrap the example. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-koa inngest-koa ``` ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-koa inngest-koa ``` ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-koa inngest-koa ``` -------------------------------- ### Test package with examples Source: https://github.com/inngest/inngest-js/blob/main/CONTRIBUTING.md Allows choosing and running an example project with the current local copy of Inngest, building and installing the package in the example before running. ```sh pnpm dev:example ``` -------------------------------- ### Bootstrapping the example project Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-fastify/README.md Commands to initialize the Inngest Fastify example project using different package managers. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-fastify inngest-fastify ``` ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-fastify inngest-fastify ``` ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-fastify inngest-fastify ``` -------------------------------- ### Optional: test with local SDK changes Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/next-realtime-hooks/README.md Commands to build and install local Inngest SDK changes for testing. ```bash pnpm build && pnpm local:pack # from this example directory npm install --no-save ../../../packages/inngest/inngest.tgz ``` -------------------------------- ### Bootstrap the example project Source: https://github.com/inngest/inngest-js/blob/main/examples/node/README.md Use create-next-app with different package managers to initialize the Inngest Node.js example project. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-node inngest-node ``` ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-node inngest-node ``` ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-node inngest-node ``` -------------------------------- ### Development Setup Source: https://github.com/inngest/inngest-js/blob/main/CLAUDE.md Commands to set up the development environment for the Inngest package. ```bash # Use pnpm (required, enforced by preinstall hook) cd packages/inngest/ pnpm dev # Installs deps, builds, lints, and watches for changes ``` -------------------------------- ### Start Inngest dev server Source: https://github.com/inngest/inngest-js/blob/main/examples/bun/README.md Command to start the Inngest development server. ```bash npx inngest-cli@latest dev ``` -------------------------------- ### Bootstrap example with npm Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-hono/README.md Command to bootstrap the Hono example project using `create-next-app` with npm. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-hono inngest-hono ``` -------------------------------- ### Bootstrap example with Yarn Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-hono/README.md Command to bootstrap the Hono example project using `create-next-app` with Yarn. ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-hono inngest-hono ``` -------------------------------- ### Run the app locally Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-hono/README.md Commands to install dependencies and start the development server for the Hono app. ```txt npm install npm run dev ``` -------------------------------- ### Pino-style Logging Example Source: https://github.com/inngest/inngest-js/blob/main/CLAUDE.md Demonstrates the preferred Pino-style object-first logging approach. ```ts // Bad logger.info("message", { key: "value" }) // Good logger.info({ key: "value" }, "message") logger.info("message") ``` -------------------------------- ### Bootstrap example with pnpm Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-hono/README.md Command to bootstrap the Hono example project using `create-next-app` with pnpm. ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-hono inngest-hono ``` -------------------------------- ### Bootstrap the example with npm Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-google-functions-framework/README.md Command to create a new Next.js app using the Inngest Google Functions Framework example with npm. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-google-functions-framework inngest-google-functions ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/middleware-validation/CLAUDE.md Commands to set up the development environment for the middleware-validation package. ```bash cd packages/middleware-validation/ pnpm install ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/ai/CLAUDE.md Commands to set up the development environment for the `@inngest/ai` package. ```bash cd packages/ai/ pnpm install ``` -------------------------------- ### Bootstrap the example project Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-express/README.md Commands to create a new Next.js app using the Inngest Express example template with different package managers. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-express inngest-express ``` ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-express inngest-express ``` ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-express inngest-express ``` -------------------------------- ### Install @inngest/eslint-plugin Source: https://github.com/inngest/inngest-js/blob/main/packages/eslint-plugin/README.md Install the `@inngest/eslint-plugin` package as a development dependency. ```sh npm install -D @inngest/eslint-plugin ``` -------------------------------- ### Bootstrap the example with pnpm Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-google-functions-framework/README.md Command to create a new Next.js app using the Inngest Google Functions Framework example with pnpm. ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-google-functions-framework inngest-google-functions ``` -------------------------------- ### Install Dependencies Source: https://github.com/inngest/inngest-js/blob/main/examples/durable-endpoints-deepresearch/README.md Commands to install project dependencies using npm or pnpm. ```bash npm install # or pnpm install ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/middleware-encryption/CLAUDE.md Commands to set up the development environment for the middleware-encryption package. ```bash # From the middleware-encryption package directory cd packages/middleware-encryption/ pnpm install ``` -------------------------------- ### Bootstrap the example with Yarn Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-google-functions-framework/README.md Command to create a new Next.js app using the Inngest Google Functions Framework example with Yarn. ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-google-functions-framework inngest-google-functions ``` -------------------------------- ### Start the server Source: https://github.com/inngest/inngest-js/blob/main/examples/step-ai/anthropic-claude-pdf-processing/README.md Command to start the server, including setting an API key. ```bash GEMINI_API_KEY= npm start ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/eslint-plugin/CLAUDE.md Commands to set up the development environment for the ESLint plugin. ```bash # From the eslint-plugin directory cd packages/eslint-plugin/ pnpm install ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/realtime/CLAUDE.md Commands to set up the `@inngest/realtime` package for development. ```bash cd packages/realtime/ pnpm install ``` -------------------------------- ### Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/test/CLAUDE.md Commands to set up the development environment for the test package. ```bash # From the test package directory cd packages/test/ pnpm install ``` -------------------------------- ### Integration Testing Commands Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/CLAUDE.md Command to run integration tests against live examples, with an example usage. ```bash pnpm itest # Run integration tests against live examples\npnpm itest framework-nextjs-app-router # Example usage ``` -------------------------------- ### Usage Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/webpack/README.md Commands to install, build, and run the application. ```sh pnpm install --ignore-workspace pnpm build pnpm dev ``` -------------------------------- ### Azure OpenAI Credentials Source: https://github.com/inngest/inngest-js/blob/main/examples/step-ai/azure-openai/README.md Create a .env file with your Azure OpenAI credentials. ```env AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/ AZURE_OPENAI_DEPLOYMENT=your-deployment-name AZURE_OPENAI_API_KEY=your-api-key-here ``` -------------------------------- ### Developing Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-sveltekit-2/README.md Commands to start a development server for a Svelte project, with an option to open in a browser. ```bash npm run dev # or start the server and open the app in a new browser tab npm run dev -- --open ``` -------------------------------- ### Register Custom Prisma Instrumentation Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/src/components/execution/otel/README.md Example of adding custom Prisma OpenTelemetry instrumentation in a user-managed OpenTelemetry setup. Ensure you have the necessary OpenTelemetry packages installed. ```typescript import { registerInstrumentations, } from "@opentelemetry/instrumentation"; import { PrismaInstrumentation } from "@prisma/instrumentation"; registerInstrumentations({ instrumentations: [new PrismaInstrumentation()], }); ``` -------------------------------- ### Run integration tests Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/CONTRIBUTING.md Command to run integration tests using a specific example. ```sh # Usage: pnpm run itest [devServerPort] [exampleServerPort] pnpm run itest framework-nextjs-app-router ``` -------------------------------- ### Bootstrap example with npm Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nestjs-fastify/README.md Command to create a new project using `create-next-app` with npm. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-nestjs-fastify inngest-nestjs-fastify ``` -------------------------------- ### Installation Source: https://github.com/inngest/inngest-js/blob/main/packages/middleware-sentry/README.md Install the Sentry middleware package. ```sh npm install @inngest/middleware-sentry ``` -------------------------------- ### Installation Source: https://github.com/inngest/inngest-js/blob/main/packages/middleware-validation/README.md Command to install the `@inngest/middleware-validation` package. ```sh npm install @inngest/middleware-validation ``` -------------------------------- ### Installation Source: https://github.com/inngest/inngest-js/blob/main/packages/middleware-encryption/README.md Command to install the encryption middleware package. ```sh npm install @inngest/middleware-encryption ``` -------------------------------- ### Run Source: https://github.com/inngest/inngest-js/blob/main/examples/bun-sync/README.md Execute the application. ```bash bun run index.ts ``` -------------------------------- ### Install @inngest/test Source: https://github.com/inngest/inngest-js/blob/main/packages/test/README.md Install the `@inngest/test` package as a development dependency. ```bash npm install -D @inngest/test ``` -------------------------------- ### Bootstrap example with Yarn Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nestjs-fastify/README.md Command to create a new project using `create-next-app` with Yarn. ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-nestjs-fastify inngest-nestjs-fastify ``` -------------------------------- ### Install Inngest Source: https://github.com/inngest/inngest-js/blob/main/README.md Command to install the Inngest package using npm. ```bash npm install inngest ``` -------------------------------- ### Bootstrap example with pnpm Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nestjs-fastify/README.md Command to create a new project using `create-next-app` with pnpm. ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-nestjs-fastify inngest-nestjs-fastify ``` -------------------------------- ### Install @inngest/ai Source: https://github.com/inngest/inngest-js/blob/main/packages/ai/README.md Command to install the Inngest AI adapter package using npm. ```bash npm install @inngest/ai ``` -------------------------------- ### Subscribe-side validation Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/schema-validation/README.md Examples showing how to enable (default) or disable subscribe-side validation for Inngest realtime topics. ```ts // Validation on (default) const stream = await inngest.realtime.subscribe({ channel: pipeline({ runId }), topics: ["status", "tokens"] }); // Validation off const stream = await inngest.realtime.subscribe({ channel: pipeline({ runId }), topics: ["status", "tokens"], validate: false }); ``` -------------------------------- ### Copy environment variables Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/nextjs-bg-jobs-realtime/README.md Copies the example environment file and provides a reminder to edit it with necessary credentials. ```bash cp .env.example .env # Edit .env to add your Neon, OpenAI, and Resend credentials ``` -------------------------------- ### Example Durable Next.js API Route Source: https://github.com/inngest/inngest-js/blob/main/examples/durable-endpoints-trip-booker/README.md Demonstrates how to make a Next.js API route durable using `inngest.endpoint()` and `step.run()`. ```typescript import { step } from "inngest"; import { Inngest } from "inngest"; import { endpointAdapter } from "inngest/next"; const inngest = new Inngest({ id: "my-app", endpointAdapter }); // This Next.js API route is now durable! export const GET = inngest.endpoint(async (req) => { // Each step is persisted - survives crashes/restarts const result = await step.run("my-step", async () => { return await doSomething(); }); return new Response(JSON.stringify({ result })); }); ``` -------------------------------- ### Serverless Inngest Client Setup Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/src/components/execution/otel/README.md In serverless environments, import your Inngest client first to ensure the OpenTelemetry provider initializes correctly before other imports. This is crucial for trace collection. ```ts // Import the client first import { inngest } from "@/inngest"; // Then import everything else import { serve } from "inngest/next"; import { myFn } from "@/inngest/functions"; export const { GET, POST, PUT } = serve({ client: inngest, functions: [myFn], }); ``` -------------------------------- ### Start the local Inngest Dev Server Source: https://github.com/inngest/inngest-js/blob/main/examples/nextjs-christmas-dinner-generator-challenge/README.md Command to start the local Inngest Development Server. ```bash npm run inngest ``` -------------------------------- ### Promise.race Workflow Diagram Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/src/test/functions/promise-race/README.md A Mermaid diagram illustrating the workflow of the Promise.race example, showing two parallel steps racing and a final step logging the winner. ```mermaid graph TD Inngest -->|demo/promise.race| Function Function --> step1["steps.run('Step A')"] Function --> step2["steps.run('Step B')"] step1 -->|A wins| step3["steps.run('Step C')"] step2 -->|B wins| step3 step3 --> ret["'A is the winner!'
or
'B is the winner!'"] ``` -------------------------------- ### Correct sequential step.run() usage Source: https://github.com/inngest/inngest-js/blob/main/packages/eslint-plugin/README.md An example demonstrating how to run steps sequentially without nesting, by extracting them into a separate function. ```ts // ✅ Good const aThenB = async () => { const someValue = await step.run("a", async () => { return "..."; }); return step.run("b", async () => { return use(someValue); }); }; await aThenB(); ``` -------------------------------- ### Setup Neon vector database tables and indexes Source: https://github.com/inngest/inngest-js/blob/main/examples/nextjs-christmas-dinner-generator-challenge/README.md SQL commands to create the `vector` extension, `holiday_recipes` and `wine_pairings` tables, and their respective HNSW indexes in a Neon database. ```sql CREATE EXTENSION IF NOT EXISTS vector; CREATE TABLE IF NOT EXISTS "holiday_recipes" ( "id" serial PRIMARY KEY NOT NULL, "content" text NOT NULL, "metadata" jsonb NOT NULL, "embedding" vector(512), "created_at" timestamp with time zone DEFAULT now(), "updated_at" timestamp with time zone DEFAULT now() ); CREATE TABLE IF NOT EXISTS "wine_pairings" ( "id" serial PRIMARY KEY NOT NULL, "content" text NOT NULL, "metadata" jsonb NOT NULL, "embedding" vector(512), "created_at" timestamp with time zone DEFAULT now(), "updated_at" timestamp with time zone DEFAULT now() ); CREATE INDEX IF NOT EXISTS "embedding_idx" ON "holiday_recipes" USING hnsw ("embedding" vector_cosine_ops); CREATE INDEX IF NOT EXISTS "embedding_idx" ON "wine_pairings" USING hnsw ("embedding" vector_cosine_ops); ``` -------------------------------- ### Bootstrap the example project Source: https://github.com/inngest/inngest-js/blob/main/examples/framework-nextjs-pages-router/README.md Commands to initialize the Next.js project using create-next-app with different package managers. ```bash npx create-next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-nextjs-pages-router inngest-nextjs ``` ```bash yarn create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-nextjs-pages-router inngest-nextjs ``` ```bash pnpm create next-app --example https://github.com/inngest/inngest-js/tree/main/examples/framework-nextjs-pages-router inngest-nextjs ``` -------------------------------- ### Promise.all Workflow Diagram Source: https://github.com/inngest/inngest-js/blob/main/packages/inngest/src/test/functions/promise-all/README.md A Mermaid diagram illustrating the parallel execution of steps using Promise.all, triggered by a 'demo/promise.all' event. ```mermaid graph TD Inngest -->|demo/promise.all| Function Function --> step1["steps.run('Step 1')"] Function --> step2["steps.run('Step 2')"] step1 & step2 --> step3["steps.run('Step 3')"] step3 --> ret["3"] ``` -------------------------------- ### Bun Test Example Source: https://github.com/inngest/inngest-js/blob/main/examples/bun-sync/CLAUDE.md A basic test file demonstrating `bun:test` syntax. ```ts import { test, expect } from "bun:test"; test("hello world", () => { expect(1).toBe(1); }); ``` -------------------------------- ### Mocking Event Data Source: https://github.com/inngest/inngest-js/blob/main/packages/test/README.md Example of mocking a single event with name and data. ```ts t.execute({ events: [{ name: "demo/event.sent", data: { message: "Hi!" } }], }); ``` -------------------------------- ### Run database migrations Source: https://github.com/inngest/inngest-js/blob/main/examples/realtime/nextjs-bg-jobs-realtime/README.md Executes database migrations using Drizzle Kit. ```bash npx drizzle-kit migrate ```