mirror of
https://github.com/hanzoai/numscript.git
synced 2026-10-30 18:26:57 +00:00
* 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
53 lines
1.0 KiB
JSON
53 lines
1.0 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/specs.schema.json",
|
|
"featureFlags": [
|
|
"experimental-oneof",
|
|
"experimental-asset-scaling"
|
|
],
|
|
"balances": {
|
|
"acc1": {},
|
|
"acc2": {
|
|
"EUR/2": 100
|
|
}
|
|
},
|
|
"testCases": [
|
|
{
|
|
"it": "fallbacks to the second branch when there's not enough",
|
|
"balances": {
|
|
"acc1": {
|
|
"EUR/2": 1
|
|
}
|
|
},
|
|
"expect.postings": [
|
|
{
|
|
"source": "acc1",
|
|
"destination": "dest",
|
|
"amount": 1,
|
|
"asset": "EUR/2"
|
|
},
|
|
{
|
|
"source": "acc2",
|
|
"destination": "dest",
|
|
"amount": 99,
|
|
"asset": "EUR/2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"it": "succeeds in the first branch",
|
|
"balances": {
|
|
"acc1": {
|
|
"EUR/2": 100
|
|
}
|
|
},
|
|
"expect.postings": [
|
|
{
|
|
"source": "acc1",
|
|
"destination": "dest",
|
|
"amount": 100,
|
|
"asset": "EUR/2"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |