Skip to content

Commit

Permalink
[#197] add an ajv-cli dependency
Browse files Browse the repository at this point in the history
Co-authored-by: spicyfalafel <[email protected]>
  • Loading branch information
Yngwarr and spicyfalafel committed Feb 23, 2024
1 parent ff90e11 commit ba6bdce
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 1 deletion.
1 change: 1 addition & 0 deletions sof-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "ISC",
"dependencies": {
"ajv": "^8.12.0",
"ajv-cli": "^5.0.0",
"fhirpath": "3.9.0",
"prettier": "^3.0.3"
},
Expand Down
143 changes: 142 additions & 1 deletion tests/fn_boundary.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,146 @@
"status": "final"
}
],
"tests": []
"tests": [
{
"title": "decimal lowBoundary",
"view": {
"resource": "Observation",
"status": "active",
"select": [
{
"column": [
{
"name": "id",
"path": "id"
},
{
"name": "decimal",
"path": "value.ofType(Quantity).value.lowBoundary()"
}
]
}
]
},
"expect": [
{
"id": "o1",
"decimal": 0.95
},
{
"id": "o2",
"decimal": null
},
{
"id": "o3",
"decimal": null
}
]
},
{
"title": "decimal highBoundary",
"view": {
"resource": "Observation",
"status": "active",
"select": [
{
"column": [
{
"name": "id",
"path": "id"
},
{
"name": "decimal",
"path": "value.ofType(Quantity).value.highBoundary()"
}
]
}
]
},
"expect": [
{
"id": "o1",
"decimal": 1.05
},
{
"id": "o2",
"decimal": null
},
{
"id": "o3",
"decimal": null
}
]
},
{
"title": "datetime lowBoundary",
"view": {
"resource": "Observation",
"status": "active",
"select": [
{
"column": [
{
"name": "id",
"path": "id"
},
{
"name": "datetime",
"path": "value.ofType(DateTime).lowBoundary()"
}
]
}
]
},
"expect": [
{
"id": "o1",
"decimal": null
},
{
"id": "o2",
"decimal": "2010-10-10T00:00:00.000+14:00"
},
{
"id": "o3",
"decimal": null
}
]
},
{
"title": "datetime highBoundary",
"view": {
"resource": "Observation",
"status": "active",
"select": [
{
"column": [
{
"name": "id",
"path": "id"
},
{
"name": "datetime",
"path": "value.ofType(DateTime).highBoundary()"
}
]
}
]
},
"expect": [
{
"id": "o1",
"decimal": null
},
{
"id": "o2",
"decimal": "2010-10-10T23:59:59.999-12:00"
},
{
"id": "o3",
"decimal": null
}
]
}
]
}

0 comments on commit ba6bdce

Please sign in to comment.