Files
Alessandro ScandoneandGitHub e58c2c09e8 fix: properly version json schemas (#171)
* fix: update schemas

* fix: update the schema of new specs file generator

* fix: update specs $schema field to the new one
2026-07-10 10:49:32 +02:00

70 lines
1.6 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.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": [
{
"account": "wallet",
"asset": "EUR",
"amount": 100
},
{
"account": "bank_account",
"asset": "EUR",
"amount": -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": [
{
"account": "wallet",
"asset": "EUR",
"amount": 50
},
{
"account": "bank_account",
"asset": "EUR",
"amount": -100
}
],
"expect.error.missingFunds": true
},
{
"it": "should not authorize transfer if bank account does not display enough balance and wallet does",
"balances": [
{
"account": "wallet",
"asset": "EUR",
"amount": 100
},
{
"account": "bank_account",
"asset": "EUR",
"amount": -50
}
],
"expect.error.missingFunds": true
}
]
}