mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
WIP
This commit is contained in:
@@ -1,22 +1,29 @@
|
||||
import chai from 'chai';
|
||||
import chaiHttp from 'chai-http';
|
||||
import chaiThings from 'chai-things';
|
||||
|
||||
import knex from '@/database/knex';
|
||||
import '@/models';
|
||||
import app from '@/app';
|
||||
import factory from '@/database/factories';
|
||||
import knexConfig from '@/../knexfile';
|
||||
import dbManager from '@/database/manager';
|
||||
// import { hashPassword } from '@/utils';
|
||||
|
||||
const request = () => chai.request(app);
|
||||
const { expect } = chai;
|
||||
|
||||
before(async () => {
|
||||
await dbManager.dropDb();
|
||||
await dbManager.createDb('ratteb');
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await knex.migrate.rollback();
|
||||
await knex.migrate.latest();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await knex.migrate.rollback();
|
||||
});
|
||||
|
||||
chai.use(chaiHttp);
|
||||
|
||||
Reference in New Issue
Block a user