Skip to content

Commit

Permalink
try adding a test for postCommentUpvote but there are problems with p…
Browse files Browse the repository at this point in the history
…romise chaining hence our trial is commented out

Relates #192
  • Loading branch information
xIrusux committed Sep 19, 2019
1 parent 38d7f27 commit 7b4b0b1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/tests/db.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,16 @@ test("Check results are correct from getRatingsByProduct query", t => {
t.end();
});
});

// test failes because of failure in the chaining of promises below

// test("Check results are correct from get postCommentUpvote", t => {
// const expected = 6;

// queries.postCommentUpvote(5, 1).then(() => {
// queries.getRatingsByProduct(2).then(ratings => {
// t.equal(ratings[0].id, expected, "Upvote successfull");
// t.end();
// });
// });
// });

0 comments on commit 7b4b0b1

Please sign in to comment.