Files
Alessandro ScandoneandGitHub 5dfc34cd3c feat: feature flag syntax (#120)
* feat: feature flag syntax

* feat: change syntax

* feat: reject invalid features

* feat: add static check of unknown features

* feat: more defensive args handling

* fix: fix typo
2026-03-04 13:32:35 +00: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
}
]
}