- update to AdonisJS 6
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m15s

This commit is contained in:
Kaimbacher 2024-03-14 20:25:27 +01:00
parent f828ca4491
commit cb51a4136f
167 changed files with 21485 additions and 21212 deletions

View file

@ -1,11 +1,11 @@
import { test } from '@japa/runner';
import supertest from 'supertest';
import Database from '@ioc:Adonis/Lucid/Database';
import Dataset from 'App/Models/Dataset';
import server from '@ioc:Adonis/Core/Server'; // Import the server instance
import User from 'App/Models/User';
import Role from 'App/Models/Role';
import Permission from 'App/Models/Permission';
import db from '@adonisjs/lucid/services/db';
import Dataset from '#app/Models/Dataset';
import server from '@adonisjs/core/services/server'; // Import the server instance
import User from '#app/Models/User';
import Role from '#app/Models/Role';
import Permission from '#app/Models/Permission';
test.group('DatasetController', (group) => {
// Write your test here
@ -14,8 +14,8 @@ test.group('DatasetController', (group) => {
// });
// In the following example, we start a global transaction before all the tests and roll back it after the tests.
group.each.setup(async () => {
await Database.beginGlobalTransaction();
return () => Database.rollbackGlobalTransaction();
await db.beginGlobalTransaction();
return () => db.rollbackGlobalTransaction();
});
test('should render dataset release page', async ({ assert }) => {