From 81e6f2ab7c3b8d96619c432a39b8ba61417d4558 Mon Sep 17 00:00:00 2001 From: Dominic Coelho Date: Thu, 9 Aug 2018 12:41:12 +0100 Subject: [PATCH] Add get data function and test relates to issue #6 and #4 --- test/getData.test.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/getData.test.js b/test/getData.test.js index 6d78980..74666ec 100644 --- a/test/getData.test.js +++ b/test/getData.test.js @@ -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(); + }); }) -}) \ No newline at end of file +}); \ No newline at end of file