Skip to content

Commit

Permalink
Naming.
Browse files Browse the repository at this point in the history
  • Loading branch information
KeesCBakker committed Apr 24, 2024
1 parent 0e0795c commit 7924c2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/adapters/Adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ class Adapter {
* Overrides the responder.
* @param {Responder} responder The responder to use.
*/
exports.overrideResponder = function(responder) {
exports.setResponder = function(responder) {
overrideResponder = responder;
}

/**
* Clears the override responder.
*/
exports.clearOverrideResponder = function() {
exports.clearResponder = function() {
overrideResponder = null;
}

Expand Down
6 changes: 3 additions & 3 deletions test/grafana-slack-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const { expect } = require('chai');
const { createTestBot, TestBotContext, createAwaitableValue } = require('./common/TestBot');
const { SlackResponder } = require('../src/adapters/implementations/SlackResponder');
const { SlackUploader } = require('../src/adapters/implementations/SlackUploader');
const { overrideResponder, clearOverrideResponder } = require('../src/adapters/Adapter');
const { setResponder, clearResponder } = require('../src/adapters/Adapter');
const { Responder } = require('../src/adapters/Responder');

describe('slack', () => {
Expand All @@ -24,7 +24,7 @@ describe('slack', () => {
let ctx;

beforeEach(async () => {
overrideResponder(new CustomResponder());
setResponder(new CustomResponder());
process.env.HUBOT_GRAFANA_S3_BUCKET = 'graf';
ctx = await createTestBot({
adapterName: 'hubot-slack',
Expand All @@ -33,8 +33,8 @@ describe('slack', () => {

afterEach(function () {
delete process.env.HUBOT_GRAFANA_S3_BUCKET;
clearResponder();
ctx?.shutdown();
clearOverrideResponder();
});

it('should respond with an uploaded graph', async () => {
Expand Down

0 comments on commit 7924c2c

Please sign in to comment.