Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
caparker committed Oct 31, 2024
1 parent ecb79b7 commit 496e10b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/generic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ tape('wide measurements work', async (t) => {
}));

const data = client.data();

t.equal(data.meta.source, 'testing', 'has correct source name');
t.equal(data.locations.length, 0, 'no locations were added');
t.equal(data.measures.length, 2, 'two measurements were added');
t.equal(data.measures[0].sensor_id, 'testing-test_site_1-co', 'has correct ingest id');
t.match(data.measures[0].timestamp, /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/, 'has correct timestamp');

t.end();
});
Expand All @@ -59,6 +59,7 @@ tape('long measurements work', async (t) => {
}));

const data = client.data();
//console.dir(data, {depth:null})

t.equal(data.meta.source, 'testing', 'has correct source name');
t.equal(data.locations.length, 0, 'no locations were added');
Expand Down

0 comments on commit 496e10b

Please sign in to comment.