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

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
}
]
}