feat: Disabled on the types'

This commit is contained in:
BluJ
2023-05-02 14:51:05 -06:00
parent 78d04219b9
commit d0cb3c5c33
4 changed files with 62 additions and 24 deletions

View File

@@ -18,26 +18,23 @@ describe("builder tests", () => {
required: { default: null },
}),
}).build({} as any)
expect(JSON.stringify(bitcoinPropertiesBuilt)).toEqual(
/*json*/ `{
"peer-tor-address": {
"type": "text",
"description": "The Tor address of the peer interface",
"warning": null,
"masked": false,
"placeholder": null,
"minLength": null,
"maxLength": null,
"patterns": [],
"inputmode":"text",
"name": "Peer tor address",
"required": true,
"default": null
}}`
.replaceAll("\n", " ")
.replaceAll(/\s{2,}/g, "")
.replaceAll(": ", ":"),
)
expect(bitcoinPropertiesBuilt).toMatchObject({
"peer-tor-address": {
type: "text",
description: "The Tor address of the peer interface",
warning: null,
masked: false,
placeholder: null,
minLength: null,
maxLength: null,
patterns: [],
disabled: false,
inputmode: "text",
name: "Peer tor address",
required: true,
default: null,
},
})
})
})