@@ -28,21 +28,27 @@ import { client, expect, scenario } from "jsr:@probitas/probitas";
2828
2929export default [
3030 scenario (" Validation - empty name" , { tags: [" validation" ] })
31- .resource (" http" , () => client .http .createHttpClient ({
32- url: Deno .env .get (" API_URL" ) ?? " http://localhost:8080" ,
33- }))
31+ .resource (" http" , () =>
32+ client .http .createHttpClient ({
33+ url: Deno .env .get (" API_URL" ) ?? " http://localhost:8080" ,
34+ }))
3435 .step (" Test" , async (ctx ) => {
35- const res = await ctx .resources .http .post (" /users" , { body: { name: " " } });
36+ const res = await ctx .resources .http .post (" /users" , {
37+ body: { name: " " },
38+ });
3639 expect (res ).toHaveStatus (400 );
3740 })
3841 .build (),
3942
4043 scenario (" Validation - invalid email" , { tags: [" validation" ] })
41- .resource (" http" , () => client .http .createHttpClient ({
42- url: Deno .env .get (" API_URL" ) ?? " http://localhost:8080" ,
43- }))
44+ .resource (" http" , () =>
45+ client .http .createHttpClient ({
46+ url: Deno .env .get (" API_URL" ) ?? " http://localhost:8080" ,
47+ }))
4448 .step (" Test" , async (ctx ) => {
45- const res = await ctx .resources .http .post (" /users" , { body: { email: " bad" } });
49+ const res = await ctx .resources .http .post (" /users" , {
50+ body: { email: " bad" },
51+ });
4652 expect (res ).toHaveStatus (400 );
4753 })
4854 .build (),
@@ -53,11 +59,14 @@ export default [
5359
5460``` typescript
5561export default scenario (" CRUD workflow" , { tags: [" crud" ] })
56- .resource (" http" , () => client .http .createHttpClient ({
57- url: Deno .env .get (" API_URL" ) ?? " http://localhost:8080" ,
58- }))
62+ .resource (" http" , () =>
63+ client .http .createHttpClient ({
64+ url: Deno .env .get (" API_URL" ) ?? " http://localhost:8080" ,
65+ }))
5966 .step (" Create" , async (ctx ) => {
60- const res = await ctx .resources .http .post (" /users" , { body: { name: " Alice" } });
67+ const res = await ctx .resources .http .post (" /users" , {
68+ body: { name: " Alice" },
69+ });
6170 return res .json <{ id: number }>()! ;
6271 })
6372 .step (" Get" , async (ctx ) => {
0 commit comments