Skip to content

Commit

Permalink
👌 Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
antonplagemann authored May 18, 2021
1 parent e3f8b58 commit a7bf483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export abstract class ConnectorPlugin {
}

/**
* Returns the mongoDb objectId, this connector is build on.
* Returns the mongoDB objectId, this connector is build on.
*
* @readonly
* @type {string}
Expand Down
14 changes: 7 additions & 7 deletions packages/backend/tests/connectors/logger.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ describe('connectors/logger.ts info()', () => {
const message = "Test";

beforeEach(() => {
spyLogger = jest.spyOn(loggerFile,'info');
spyLogger = jest.spyOn(loggerFile, 'info');
});

afterEach(() => {
jest.clearAllMocks();
});

it('should save message to logs', () => {
it('should save the message to logs', () => {
connectorLogger.info(message, "123");
expect(spyLogger).toHaveBeenCalledWith(message);
expect(ConnectorLogItem).toHaveBeenCalled();
});

it('should skip to save the message to logs', () => {
it('should skip saving the message to logs', () => {
connectorLogger.info(message, "123", true);
expect(spyLogger).toHaveBeenCalledWith(message);
expect(ConnectorLogItem).not.toHaveBeenCalled();
Expand All @@ -42,13 +42,13 @@ describe('connectors/logger.ts warn()', () => {
jest.clearAllMocks();
});

it('should save message to logs', () => {
it('should save the message to logs', () => {
connectorLogger.warn(message, "123");
expect(spyLogger).toHaveBeenCalledWith(message);
expect(ConnectorLogItem).toHaveBeenCalled();
});

it('should skip to save the message to logs', () => {
it('should skip saving the message to logs', () => {
connectorLogger.warn(message, "123", true);
expect(spyLogger).toHaveBeenCalledWith(message);
expect(ConnectorLogItem).not.toHaveBeenCalled();
Expand All @@ -67,13 +67,13 @@ describe('connectors/logger.ts error()', () => {
jest.clearAllMocks();
});

it('should save message to logs', () => {
it('should save the message to logs', () => {
connectorLogger.error(message, "123");
expect(spyLogger).toHaveBeenCalledWith(message);
expect(ConnectorLogItem).toHaveBeenCalled();
});

it('should skip to save the message to logs', () => {
it('should skip saving the message to logs', () => {
connectorLogger.error(message, "123", true);
expect(spyLogger).toHaveBeenCalledWith(message);
expect(ConnectorLogItem).not.toHaveBeenCalled();
Expand Down

0 comments on commit a7bf483

Please sign in to comment.