Skip to content

Commit

Permalink
style: modify and reformat json test files (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkp7 authored Dec 13, 2021
1 parent 1c524fe commit 5f06c5f
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 43 deletions.
22 changes: 11 additions & 11 deletions test/data/delta-invalid/meta-missing-value.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"context": "bar",
"updates": [{
"source": {
"label": "schema"
},
"timestamp": "2013-10-08T15:47:28.263Z",
"meta": [{
"path": "a.b.c"
}]
}]
}
"context": "vessels.urn:mrn:imo:mmsi:234567890",
"updates": [
{
"meta": [
{
"path": "propulsion.0.revolutions"
}
]
}
]
}
45 changes: 27 additions & 18 deletions test/data/delta-valid/meta-and-values.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
{
"context": "bar",
"updates": [{
"source": {
"label": "schema"
},
"timestamp": "2013-10-08T15:47:28.263Z",
"meta": [{
"path": "a.b.c",
"value": {
"description": "...",
"units": "m"
"context": "vessels.urn:mrn:imo:mmsi:234567890",
"updates": [
{
"source": {
"label": "N2000-01",
"type": "NMEA2000",
"src": "017",
"pgn": 127488
},
"timestamp": "2013-10-08T15:47:28.263Z",
"meta": [
{
"path": "propulsion.0.revolutions",
"value": {
"description": "Engine revolutions (x60 for RPM)",
"units": "Hz"
}
}],
"values": [{
"path": "a.b.c",
"value": 1234
}]
}]
}
}
],
"values": [
{
"path": "propulsion.0.revolutions",
"value": 11
}
]
}
]
}
37 changes: 23 additions & 14 deletions test/data/delta-valid/meta-delta.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"context": "bar",
"updates": [{
"source": {
"label": "schema"
},
"timestamp": "2013-10-08T15:47:28.263Z",
"meta": [{
"path": "a.b.c",
"value": {
"description": "...",
"units": "m"
"context": "vessels.urn:mrn:imo:mmsi:234567890",
"updates": [
{
"meta": [
{
"path": "environment.depth.belowTransducer",
"value": {
"description": "Depth below Transducer",
"units": "m",
"timeout": 2.5,
"zones": [
{
"upper": 5.0,
"state": "warn",
"message": "Shallow water"
}
],
"warnMethod": ["sound"]
}
}]
}]
}
}
]
}
]
}

0 comments on commit 5f06c5f

Please sign in to comment.