api-boltAPIBolt

body()

The isolated module for strictly executing payload body verifications.

ts
ab.body("Primitive match").toBe("OK");
ab.body("Value is 10").toBe(10);
ab.body("Deep equality").toEqual({ key: "value" });

ab.body("Value exists").toExist();

ab.body("Check string").toBeType("string");
ab.body("Check array").toBeType("array");

ab.body("Array contains item").toContain("apple");

ab.body("Has property").toHaveProperty("user.name");

ab.body("Array has length 3").toHaveLength(3);

ab.body("Greater than 10").toBeGreaterThan(10);
ab.body("Between 10 and 20").toBeBetween(10, 20);