Skip to content

Commit

Permalink
doc cosmetic [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
darky authored Nov 2, 2024
1 parent 2c567e5 commit a3aab79
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ const catsBirthdays = klubok(
eff('saved', async ({ catsOneYearOld }) => { /* save to DB */ })
)

catsBirthdays({ ids: [1, 2, 3] }) // production implementation
// production usage
catsBirthdays({ ids: [1, 2, 3] })

// in tests usage
catsBirthdays(
{ ids: [1, 2, 3] },
{
cats: [ // DB response mock, can be function
// DB response mock
cats: () => [
{ name: 'Barsik', age: 10 },
{ name: 'Marfa', age: 7 }
]
},
['catsOneYearOld'] // call only this functions
// call only this functions
['catsOneYearOld']
) // Promise<{ ..., catsOneYearOld: [{ name: 'Barsik', age: 11 }, { name: 'Marfa', age: 8 }] }>

```
Expand Down

0 comments on commit a3aab79

Please sign in to comment.