Skip to content
Snippets Groups Projects
Commit b8b62f46 authored by Elisabeth Marie Opsahl's avatar Elisabeth Marie Opsahl
Browse files

feil i test

parent 4d9d2dbb
No related branches found
No related tags found
No related merge requests found
Pipeline #22665 failed
...@@ -33,6 +33,10 @@ beforeAll(done => { ...@@ -33,6 +33,10 @@ beforeAll(done => {
}); });
}); });
afterAll(() => {
pool.end();
});
test("get one person from db", done => { test("get one person from db", done => {
function callback(status, data) { function callback(status, data) {
console.log( console.log(
...@@ -100,30 +104,6 @@ test("delete user from sb", done => { ...@@ -100,30 +104,6 @@ test("delete user from sb", done => {
}); });
}); });
/*
test("delete one person from db", done => {
function callback(status, data) {
console.log(
"Test callback: status=" + status + ", data.length=" + data.length
);
personDao.getAll((status, data) => {
var number = data.length;
personDao.deleteOne(8, callback => {
personDao.getAll((status, data)=> {
expect(data.length).toBe(number - 1);
done();
});
});
});
}
console.log(
"Test callvack: status=" + status + ", data=" + JSON.stringify(data) + ", data.length=" + data.length
);
*/
test("update one person from db", done => { test("update one person from db", done => {
function callback(status, data) { function callback(status, data) {
...@@ -136,6 +116,6 @@ test("update one person from db", done => { ...@@ -136,6 +116,6 @@ test("update one person from db", done => {
personDao.updateOne( personDao.updateOne(
{navn: "Nils Harriettson", alder: 54, adresse: "Veien 5", id: 3}, (status, data) => { {navn: "Nils Harriettson", alder: 54, adresse: "Veien 5", id: 3}, (status, data) => {
personDao.getOne(3, callback) personDao.getOne(7, callback)
}); });
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment