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

46 lines
1.2 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/specs.schema.json",
"featureFlags": [
"experimental-overdraft-function",
"experimental-mid-script-function-call",
"experimental-oneof"
],
"variables": {
"amt": "100",
"dest": "alice"
},
"testCases": [
{
"it": "should authorize transfer if both wallet and bank accounts display enough balance",
"balances": {
"wallet": { "EUR": 100 },
"bank_account": { "EUR": -100 }
},
"expect.postings": [
{
"source": "wallet",
"destination": "alice",
"amount": 100,
"asset": "EUR"
}
]
},
{
"it": "should not authorize transfer if wallet does not display enough balance and bank account does",
"balances": {
"wallet": { "EUR": 50 },
"bank_account": { "EUR": -100 }
},
"expect.error.missingFunds": true
},
{
"it": "should not authorize transfer if bank account does not display enough balance and wallet does",
"balances": {
"wallet": { "EUR": 100 },
"bank_account": { "EUR": -50 }
},
"expect.error.missingFunds": true
}
]
}