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
70 lines
1.6 KiB
JSON
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
|
|
}
|
|
]
|
|
}
|