Skip to content
Snippets Groups Projects

feat(ssi): multitenancy support

Merged Berend Sliedrecht requested to merge tsabolov/ocm-engine:multitenancy into main
Files
39
import { BaseEvent, EventDidcommConnectionsGetAll } from './events.js';
import { BaseEvent } from '../baseEvents.js';
describe('check logger', () => {
describe('Base Events', () => {
it('should return module', () => {
jest.requireActual('./events');
jest.requireActual('../baseEvents');
});
it('should create a new base event', () => {
const baseEvent = new BaseEvent({ some: 'data' });
const baseEvent = new BaseEvent({ some: 'data' }, 'tenantId');
expect(typeof baseEvent.id).toStrictEqual('string');
expect(baseEvent.type).toStrictEqual('BaseEvent');
expect(baseEvent.timestamp).toBeInstanceOf(Date);
expect(baseEvent.data).toMatchObject({ some: 'data' });
});
it('should create a new connections get all event', () => {
const getAllConnectionsEvent = new EventDidcommConnectionsGetAll({
connections: [],
});
expect(typeof getAllConnectionsEvent.id).toStrictEqual('string');
expect(getAllConnectionsEvent.type).toStrictEqual(
'EventDidcommConnectionsGetAll',
);
expect(getAllConnectionsEvent.timestamp).toBeInstanceOf(Date);
expect(getAllConnectionsEvent.data).toMatchObject({ connections: [] });
});
});
Loading