Run Your First Test
1. Initialize a project
mkdir my-project && cd my-project
glubean initExpected folders:
my-project/
├── explore/
├── tests/
└── deno.json2. Add environment variables
Create .env in project root:
BASE_URL=http://localhost:30003. Write a basic test
import { test } from "@glubean/sdk";
export const health = test("health", async (ctx) => {
const baseUrl = ctx.vars.require("BASE_URL");
const res = await ctx.http.get(`${baseUrl}/health`);
ctx.expect(res.status).toBe(200);
});4. Run it
glubean run ./testsOr run from the editor gutter/Test Explorer if you installed the extension.
5. Inspect outputs
- Trace files and result files are described in Reference: Artifacts.
- For failure triage, continue with Guides: Debugging.
Last updated on