useDatabaseTransactionsAll function

void useDatabaseTransactionsAll({
  1. bool debug = false,
})

Implementation

void useDatabaseTransactionsAll({bool debug = false}) {
  setUpAll(() async {
    DatabaseServiceProvider().boot(app());
    if (debug) print('>> using database transaction');
    await DB.begin();
  });

  tearDownAll(() async {
    await DB.rollback();
    if (debug) print('>> database transaction rolled back');
  });
}