feat: Implement getUser graphQL query test

This commit is contained in:
Faruk AYDIN
2023-10-03 19:50:02 +02:00
parent f0712bd213
commit 5a578643a6
3 changed files with 163 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
import { transaction, Model } from 'objection';
import { Model } from 'objection';
import { client as knex } from '../../src/config/database';
import logger from '../../src/helpers/logger';
@@ -12,7 +12,7 @@ global.beforeEach(async () => {
// It's assigned as global.knex for the convenience even though
// it's a transaction. It's rolled back after each test.
// by assigning to knex, we can use it as knex.table('example') in tests files.
global.knex = await transaction.start(knex);
global.knex = await knex.transaction();
Model.knex(global.knex);
});