Skip to content

Commit 86b7851

Browse files
committed
docs: Add Skip and unnamed step examples to README
1 parent 6ab2894 commit 86b7851

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,15 @@ This creates:
4848
Create `scenarios/hello.scenario.ts`:
4949

5050
```typescript
51-
import { scenario } from "probitas";
51+
import { scenario, Skip } from "probitas";
5252

5353
export default scenario("Hello Probitas", { tags: ["example"] })
54+
.step(() => {
55+
// Unnamed steps are auto-named as "Step N"
56+
if (!Deno.env.get("RUN_EXAMPLE")) {
57+
throw new Skip("Example skipped");
58+
}
59+
})
5460
.step("Greet", () => {
5561
return { message: "Hello, World!" };
5662
})

0 commit comments

Comments
 (0)