mirror of
https://github.com/hanzoai/numscript.git
synced 2026-10-30 18:26:57 +00:00
* 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
46 lines
1.2 KiB
JSON
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
|
|
}
|
|
]
|
|
}
|