@nlighten/json-transform-core
Version:
Core types and utilities for handling JSON transformers
103 lines (102 loc) • 2.15 kB
JSON
[
{
"name": "Inline with Value",
"given": {
"input": "text",
"definition": "$$pad(END,6):text"
},
"expect": {
"equal": "text00"
}
},
{
"name": "Inline with Right",
"given": {
"input": "text",
"definition": "$$pad(RIGHT,6,0):$"
},
"expect": {
"equal": "text00"
}
},
{
"name": "Inline with Space",
"given": {
"input": "text",
"definition": "$$pad(END,6,' '):$"
},
"expect": {
"equal": "text "
}
},
{
"name": "Inline with Left Space",
"given": {
"input": "text",
"definition": "$$pad(LEFT,6,' '):$"
},
"expect": {
"equal": " text"
}
},
{
"name": "Inline with Left X",
"given": {
"input": "text",
"definition": "$$pad(LEFT,6,x):$"
},
"expect": {
"equal": "xxtext"
}
},
{
"name": "Inline",
"given": {
"input": "text",
"definition": "$$pad(RIGHT,3,2):$"
},
"expect": {
"equal": "text"
}
},
{
"name": "Inline with Start XY",
"given": {
"input": "text",
"definition": "$$pad(START,6,xy):$"
},
"expect": {
"equal": "xytext"
}
},
{
"name": "Inline with Start XY Long",
"given": {
"input": "text",
"definition": "$$pad(START,9,xy):$"
},
"expect": {
"equal": "xyxyxtext"
}
},
{
"name": "Inline Bad Input 1",
"given": {
"input": "text",
"definition": "$$pad:$"
},
"expect": {
"equal": "text"
}
},
{
"name": "Inline Bad Input 2",
"given": {
"input": "text",
"definition": "$$pad(START):$"
},
"expect": {
"equal": "text"
}
}
]