22 lines
486 B
TypeScript
22 lines
486 B
TypeScript
import rewiremock from 'rewiremock';
|
|
import '../../../mocks/electron';
|
|
|
|
import { expect } from 'chai';
|
|
import 'mocha';
|
|
import { Database, getConnection } from './database';
|
|
|
|
describe('Database Service', () => {
|
|
before(() => {
|
|
rewiremock.enable();
|
|
});
|
|
|
|
after(() => {
|
|
rewiremock.disable();
|
|
});
|
|
|
|
it('returns a connection', async () => {
|
|
const libraryConnection = await getConnection(Database.LIBRARY);
|
|
expect(libraryConnection).to.not.equal(undefined);
|
|
});
|
|
});
|