The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/apps-engine/tests/server/compiler/AppImplements.spec.ts

19 lines
669 B

import { Expect, Test } from 'alsatian';
import { AppInterface } from '../../../src/definition/metadata';
import { AppImplements } from '../../../src/server/compiler';
export class AppImplementsTestFixture {
@Test()
public appImplements() {
Expect(() => new AppImplements()).not.toThrow();
const impls = new AppImplements();
Expect(impls.getValues()).toBeDefined();
Expect(() => impls.doesImplement(AppInterface.IPreMessageSentPrevent)).not.toThrow();
Expect(impls.getValues()[AppInterface.IPreMessageSentPrevent]).toBe(true);
Expect(() => impls.doesImplement('Something')).not.toThrow();
Expect(impls.getValues().Something).not.toBeDefined();
}
}