Skip to content

Commit 0073c3a

Browse files
committed
cleanup
1 parent a4494b6 commit 0073c3a

8 files changed

Lines changed: 3 additions & 41 deletions

test/test-formatdata.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ describe('SlackFormatter', function() {
130130
});
131131
});
132132

133+
//These providers are no longer supported on hubot11
133134
// describe('MattermostFormatter', function() {
134135
// var adapterName = 'mattermost';
135136
// var robot = new DummyRobot('dummy', null, false);

test/test-postdata.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ describe("slack post data", function() {
355355
});
356356
});
357357

358+
//These providers are no longer supported on hubot11
358359
// describe("msteams post data", function () {
359360
// var logMessage;
360361
// var logger = new Log('debug');

test/test-st2-invalid-auth.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ var chai = require("chai"),
2424
sinonChai = require('sinon-chai'),
2525
chaiAsPromised = require('chai-as-promised'),
2626
mockedEnv = require('mocked-env'),
27-
//Robot = require("hubot/src/Robot.mjs"),
2827
Logger = require('./dummy-logger.js');
2928

3029
chai.use(sinonChai);
@@ -35,7 +34,6 @@ global.process.exit = sinon.spy();
3534

3635
describe("invalid st2 credential configuration", async function() {
3736
var hubot_import = await import("hubot/index.mjs");
38-
//var robot = (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
3937
var robot = new hubot_import.Robot("mock-adapter", false, "Hubot");
4038
robot.logger = new Logger(true);
4139
var restore_env = null,

test/test-st2-unauthorized.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@ var chai = require('chai'),
2323
sinon = require('sinon'),
2424
sinonChai = require('sinon-chai'),
2525
nock = require('nock'),
26-
//Robot = require('hubot/src/Robot.mjs'),
2726
Logger = require('./dummy-logger.js');
2827

2928
chai.use(sinonChai);
3029

3130
describe("auth with invalid st2 API key", async function() {
32-
//const Robot = await import("hubot/src/Robot.mjs");
33-
//var Robot = await import("hubot/src/Robot.mjs");
3431
var stop;
3532
var hubot_import = await import("hubot/index.mjs");
36-
//var robot = new (await import("hubot/src/Robot.mjs")).default("mock-adapter", true, "Hubot");
37-
//const robot = (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
38-
3933
var robot = new hubot_import.Robot("mock-adapter", true, "Hubot");
4034
robot.logger = new Logger(true);
4135
var recordedError = null,

test/test-st2bot-envvars.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,14 @@ var chai = require("chai"),
2323
sinon = require('sinon'),
2424
sinonChai = require('sinon-chai'),
2525
mockedEnv = require('mocked-env'),
26-
//Robot = require("hubot/src/Robot.mjs"),
2726
Logger = require('./dummy-logger.js');
2827

2928
chai.use(sinonChai);
3029

3130
describe("environment variable configuration", async function () {
32-
//const Robot = await import("hubot/src/Robot.mjs");
33-
//var Robot = await import("hubot/src/Robot.mjs");
34-
//var robot = new (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
3531
var hubot_import = await import("hubot/index.mjs");
3632
var robot = new hubot_import.Robot("mock-adapter", false, "Hubot");
3733

38-
//const robot = (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
39-
4034
robot.logger = new Logger(true);
4135
var restore_env = null,
4236
debug_spy = sinon.spy(robot.logger, 'debug'),

test/test-st2bot-setup.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
//import Robot from 'hubot/src/Robot';
2121

2222
var expect = require("chai").expect,
23-
path = require("path")
24-
//Robot = require("hubot/src/Robot.mjs"),
25-
//TextMessage = require("hubot/src/message").TextMessage;
23+
path = require("path");
2624

2725
var disableLogger = true,
2826
logs = [],
@@ -35,19 +33,13 @@ var disableAuth = function() {
3533
};
3634

3735
describe("stanley the StackStorm bot", async function() {
38-
//const Robot = await import("hubot/src/Robot.mjs");
39-
//var Robot = await import("hubot/src/Robot.mjs");
40-
41-
//const TextMessage = await import("hubot/src/Message.mjs").TextMessage;
4236
var hubot_import = await import("hubot/index.mjs");
4337

4438
var robot, user, adapter, st2bot, stop;
4539

4640
before( async function(done) {
47-
//var robot = (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
4841
robot = new hubot_import.Robot("mock-adapter", true, "Hubot");
4942
var TextMessage = new hubot_import.TextMessage;
50-
//robot = new (await import("hubot/src/Robot.mjs")).default("mock-adapter", true, "Hubot");
5143

5244
// Hack. Need a better solution than stubbing out methods.
5345
if (disableLogger) {

test/test-st2bot-sigusr2.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,18 @@
1616
/*jshint -W030*/
1717
/*global describe, it, afterEach*/
1818
'use strict';
19-
//import Robot from 'hubot/src/Robot';
2019

2120
var chai = require("chai"),
2221
expect = chai.expect,
2322
sinon = require('sinon'),
2423
sinonChai = require('sinon-chai'),
2524
nock = require('nock'),
26-
//Robot = require("hubot/src/Robot.mjs"),
2725
Logger = require('./dummy-logger.js');
2826

2927
chai.use(sinonChai);
3028

3129
describe("SIGUSR2", async function () {
32-
//const Robot = await import("hubot/src/Robot.mjs");
33-
//var Robot = await import("hubot/src/Robot.mjs");
34-
//var robot = new (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
3530
var hubot_import = await import("hubot/index.mjs");
36-
37-
//const robot = (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
38-
3931
var robot = new hubot_import.Robot("mock-adapter", false, "Hubot");
4032
robot.logger = new Logger(true);
4133
var debug_spy = sinon.spy(robot.logger, 'debug'),

test/test-twofactor.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@
1616
/*jshint -W030*/
1717
/*global describe, it, before, after*/
1818
"use strict";
19-
//import Robot from 'hubot/src/Robot';
2019

2120
var fs = require('fs'),
2221
expect = require("chai").expect,
2322
path = require("path"),
24-
//Robot = require("hubot/src/Robot.mjs"),
25-
//TextMessage = require("hubot/src/message").TextMessage,
2623
CommandFactory = require('../src/lib/command_factory.js'),
2724
formatCommand = require('../src/lib/format_command.js'),
2825
utils = require('../src/lib/utils.js');
@@ -40,18 +37,11 @@ var enableTwofactor = function() {
4037

4138
describe("two-factor auth module", async function() {
4239
var hubot_import = await import("hubot/index.mjs");
43-
44-
//const TextMessage = await import("hubot/src/Message.mjs").TextMessage;
4540
var TextMessage = new hubot_import.TextMessage;
46-
//var Robot = await import("hubot/src/Robot.mjs");
47-
4841
var robot, user, adapter, st2bot, stop, command_factory;
4942

5043
before( async function(done) {
5144
robot = new hubot_import.Robot("mock-adapter", true, "Hubot");
52-
//const robot = (await import("hubot/src/Robot.mjs")).default("mock-adapter", false, "Hubot");
53-
54-
//robot = new (await import("hubot/src/Robot.mjs")).default("mock-adapter", true, "Hubot");
5545

5646
// Hack. Need a better solution than stubbing out methods.
5747
if (disableLogger) {

0 commit comments

Comments
 (0)