Skip to content

Commit

Permalink
Add get data function and test
Browse files Browse the repository at this point in the history
relates to issue #6 and #4
  • Loading branch information
VirtualDOMinic committed Aug 9, 2018
1 parent 7e273af commit 81e6f2a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/getData.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ tape('tape is working', t => {

tape('test get data', t => {
runDbBuild((err) => {
const expected = '';
getData('SELECT * FROM users', (err, gotdata) =>
t.deepEquals(gotdata, expected, 'getData should return itself'));
t.error(err, 'No Error');
const expected = 1;
getData((err, gotdata) => {
if (err) console.log(err);
t.deepEqual(gotdata[0].id, expected, 'getData should return itself');
t.end();
});
})
})
});

0 comments on commit 81e6f2a

Please sign in to comment.