Skip to content

Commit

Permalink
fix(test): test entity module
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Sep 8, 2019
1 parent 619968e commit 0f0b5ac
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/module/TestEntityModule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { expect } from 'chai';
import { isConstructor } from 'noicejs';

import { EntityModule } from '../../src/module/EntityModule';
import { describeAsync } from '../helpers/async';

describeAsync('DI modules', async () => {
describeAsync('entity module', async () => {
it('should return list of entity types', async () => {
const module = new EntityModule();
const entities = await module.createEntities();

expect(Array.isArray(entities)).to.equal(true);
expect(entities.length).to.be.greaterThan(0);

for (const entity of entities) {
expect(isConstructor(entity)).to.equal(true, 'entity must be constructor');
}
});
});
});

0 comments on commit 0f0b5ac

Please sign in to comment.