@lcap/asl
Version:
NetEase Application Specific Language
32 lines (21 loc) • 952 B
text/typescript
import { expect } from 'chai';
import { getApp, dateHash } from '../../fixtures/env';
describe('MicroService', () => {
const entityName = `Student_` + dateHash();
const entityName2 = `Student_` + dateHash() + 2;
it('addEntity(name: string)', async () => {
const app = await getApp();
const entity = await app.firstMicroService.addEntity(entityName);
expect(app.firstMicroService.data.entities).includes(entity);
});
it('addEntity(name: string)', async () => {
const app = await getApp();
const entity = await app.firstMicroService.addEntity(entityName);
expect(app.firstMicroService.data.entities).includes(entity);
});
it('removeEntity(name: string)', async () => {
const app = await getApp();
const entity = await app.firstMicroService.removeEntity(entityName);
expect(app.firstMicroService.data.entities).not.includes(entity);
});
});