Files
Alessandro ScandoneandGitHub 3a4eb3803f feat: improve testing tool (#93)
* breaking: change assertion name

* feat: add errMissingFunds assertion

* breaking: renamed assertion

* breaking: renamed assertions

* feat: added expect.endBalances.include assertion

* feat: better test output

* fix

* feat: added focus and skip

* improve UI for focused/skipped tests

* improve test ui
2025-10-02 16:29:35 +02:00

56 lines
1.1 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/specs.schema.json",
"variables": {
"amt": "EUR/2 100",
"limit": "EUR/2 150"
},
"balances": {
"alice": {
"EUR/2": 9999
}
},
"testCases": [
{
"it": "should send the amount when destination doesn't reach 150",
"balances": {
"jon": {
"EUR/2": 0
}
},
"expect.postings": [
{
"source": "alice",
"destination": "jon",
"amount": 100,
"asset": "EUR/2"
}
]
},
{
"it": "should send the amount when destination doesn't reach 150 (2)",
"balances": {
"jon": {
"EUR/2": 50
}
},
"expect.postings": [
{
"source": "alice",
"destination": "jon",
"amount": 100,
"asset": "EUR/2"
}
]
},
{
"it": "should fail if the end balance would exceed 150",
"balances": {
"jon": {
"EUR/2": 51
}
},
"expect.error.missingFunds": true
}
]
}