Add a test to ensure that the value is read correctly

Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
Karan Shah
2022-02-17 12:15:10 +00:00
parent 8e64530892
commit b84c644fb9
@@ -27,6 +27,17 @@ describe('ExtractAirbrakeConfig', () => {
voidLogger = getVoidLogger();
});
it('gets the API key', () => {
const config = new ConfigReader({
airbrake: {
apiKey: 'fakeApiKey',
},
});
const airbrakeConfig = extractAirbrakeConfig(config, voidLogger);
expect(airbrakeConfig.apiKey).toStrictEqual('fakeApiKey');
});
it('does not fail in development', () => {
process.env = {
...oldProcessEnv,