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/accessors/EnvironmentRead.spec.ts

29 lines
884 B

import { Expect, SetupFixture, Test } from 'alsatian';
import type { IEnvironmentalVariableRead, IServerSettingRead, ISettingRead } from '../../../src/definition/accessors';
import { EnvironmentRead } from '../../../src/server/accessors';
export class EnvironmentReadTestFixture {
private evr: IEnvironmentalVariableRead;
private ssr: IServerSettingRead;
private sr: ISettingRead;
@SetupFixture
public setupFixture() {
this.evr = {} as IEnvironmentalVariableRead;
this.ssr = {} as IServerSettingRead;
this.sr = {} as ISettingRead;
}
@Test()
public useEnvironmentRead() {
Expect(() => new EnvironmentRead(this.sr, this.ssr, this.evr)).not.toThrow();
const er = new EnvironmentRead(this.sr, this.ssr, this.evr);
Expect(er.getSettings()).toBeDefined();
Expect(er.getServerSettings()).toBeDefined();
Expect(er.getEnvironmentVariables()).toBeDefined();
}
}