adding jest and jest files

This commit is contained in:
Aster Fialla
2026-02-14 18:16:10 -05:00
committed by pieartsy
parent 68629fd75d
commit a2c0530118
9 changed files with 9 additions and 0 deletions

View File

@@ -18,5 +18,8 @@
}, },
"devDependencies": { "devDependencies": {
"jest": "^30.2.0" "jest": "^30.2.0"
},
"scripts": {
"test": "jest"
} }
} }

View File

@@ -37,6 +37,9 @@ database.members = sequelize.define('Member', {
} }
}); });
/**
* Checks Sequelize database connection.
*/
database.check_connection = async function() { database.check_connection = async function() {
await sequelize.authenticate().then(async (result) => { await sequelize.authenticate().then(async (result) => {
console.log('Connection has been established successfully.'); console.log('Connection has been established successfully.');
@@ -47,6 +50,9 @@ database.check_connection = async function() {
}); });
} }
/**
* Syncs Sequelize models.
*/
async function syncModels() { async function syncModels() {
await sequelize.sync().then(() => { await sequelize.sync().then(() => {
console.log('Models synced successfully.'); console.log('Models synced successfully.');

0
tests/bot.test.js Normal file
View File

0
tests/commands.test.js Normal file
View File

View File

View File

View File

View File

View File