mirror of
https://github.com/hanzo-fi/numscript.git
synced 2026-10-30 20:54:52 +00:00
* fix: update schemas * fix: update the schema of new specs file generator * fix: update specs $schema field to the new one
56 lines
1.1 KiB
JSON
56 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.specs.schema.json",
|
|
"variables": {
|
|
"cap": "10",
|
|
"fee": "10%"
|
|
},
|
|
"testCases": [
|
|
{
|
|
"it": "it sends 10% of the fee when lower than cap",
|
|
"variables": {
|
|
"amt": "10"
|
|
},
|
|
"expect.postings": [
|
|
{
|
|
"source": "world",
|
|
"destination": "fees",
|
|
"amount": 1,
|
|
"asset": "USD"
|
|
},
|
|
{
|
|
"source": "world",
|
|
"destination": "dest",
|
|
"amount": 9,
|
|
"asset": "USD"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"it": "it caps the fee to the $cap",
|
|
"variables": {
|
|
"amt": "500"
|
|
},
|
|
"expect.postings": [
|
|
{
|
|
"source": "world",
|
|
"destination": "fees",
|
|
"amount": 10,
|
|
"asset": "USD"
|
|
},
|
|
{
|
|
"source": "world",
|
|
"destination": "dest",
|
|
"amount": 40,
|
|
"asset": "USD"
|
|
},
|
|
{
|
|
"source": "world",
|
|
"destination": "dest",
|
|
"amount": 450,
|
|
"asset": "USD"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|