Add skeleton
This commit is contained in:
13
helpers/test_helper.js
Normal file
13
helpers/test_helper.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const pool = require("../config");
|
||||
|
||||
const usersInDb = async () => {
|
||||
const users = await pool.query("SELECT * FROM USERS");
|
||||
return users.rows;
|
||||
};
|
||||
|
||||
const productsInDb = async () => {
|
||||
const products = await pool.query("SELECT * FROM products");
|
||||
return products.rows;
|
||||
};
|
||||
|
||||
module.exports = { usersInDb, productsInDb };
|
||||
Reference in New Issue
Block a user