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/tests/server/managers/AppApi.test.ts

24 lines
736 B

import * as assert from 'node:assert';
import { describe, it } from 'node:test';
import type { IApi } from '@rocket.chat/apps-engine/definition/api';
import type { IApiEndpoint } from '@rocket.chat/apps-engine/definition/api/IApiEndpoint';
import type { ProxiedApp } from '../../../src/server/ProxiedApp';
import { AppApi } from '../../../src/server/managers/AppApi';
describe('AppApi', () => {
it('ensureAppApi', () => {
const mockApp = {
getID() {
return 'id';
},
} as ProxiedApp;
assert.doesNotThrow(() => new AppApi(mockApp, {} as IApi, {} as IApiEndpoint));
const ascr = new AppApi(mockApp, {} as IApi, {} as IApiEndpoint);
assert.ok(ascr.app !== undefined);
assert.ok(ascr.api !== undefined);
});
});