test: remove roles and permission with global before all hook

This commit is contained in:
Faruk AYDIN
2023-10-15 16:54:51 +02:00
parent 25224f0308
commit 1e601559a0

View File

@@ -5,6 +5,9 @@ import logger from '../../src/helpers/logger';
global.beforeAll(async () => {
global.knex = null;
logger.silent = true;
// Remove default roles and permissions before running the test suite
await knex.raw('TRUNCATE TABLE roles, permissions CASCADE');
});
global.beforeEach(async () => {