Skip to content

Commit

Permalink
Test database build
Browse files Browse the repository at this point in the history
Relates #192
  • Loading branch information
Albadylic committed Sep 19, 2019
1 parent 000905a commit 6012d32
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/tests/db.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,22 @@ const _test = require("tape-promise").default;

const test = _test(tape);
const { build, connection } = require("../model/database/db_build");
const queries = require("../model/queries");

test("tape test for db files is working", t => {
test("Tape test for db files is working", t => {
t.equal(1, 1, "1 equals 1");
t.end();
});

// ideally would be good to be able to check whether a database actually has built itself

test("Check test database builds correctly", t => {
connection
.query(build)
.then(() => console.log("Database connected and built"))
.then(() => {
t.pass("Test DB built correctly");
t.end();
})
.catch(e => console.error("error", e));
});

0 comments on commit 6012d32

Please sign in to comment.