Skip to content

Commit 297a358

Browse files
committed
try async
1 parent 419c78c commit 297a358

6 files changed

Lines changed: 14 additions & 12 deletions

test/test-st2-invalid-auth.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/*global describe, it, before, after, beforeEach, afterEach*/
1818
'use strict';
1919
//import Robot from 'hubot/src/Robot';
20-
const Robot = await import("hubot/src/Robot.mjs");
2120
var chai = require("chai"),
2221
expect = chai.expect,
2322
chaiString = require("chai-string"),
@@ -34,7 +33,9 @@ chai.use(chaiAsPromised);
3433

3534
global.process.exit = sinon.spy();
3635

37-
describe("invalid st2 credential configuration", function() {
36+
describe("invalid st2 credential configuration", async function() {
37+
const Robot = await import("hubot/src/Robot.mjs");
38+
3839
var robot = new Robot(null, "mock-adapter", false, "Hubot");
3940
robot.logger = new Logger(true);
4041
var restore_env = null,

test/test-st2-unauthorized.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/*global describe, it, before, after*/
1818
'use strict';
1919
//import Robot from 'hubot/src/Robot';
20-
const Robot = await import("hubot/src/Robot.mjs");
2120

2221
var chai = require('chai'),
2322
expect = chai.expect,
@@ -29,7 +28,9 @@ var chai = require('chai'),
2928

3029
chai.use(sinonChai);
3130

32-
describe("auth with invalid st2 API key", function() {
31+
describe("auth with invalid st2 API key", async function() {
32+
const Robot = await import("hubot/src/Robot.mjs");
33+
3334
var stop;
3435
var robot = new Robot(null, "mock-adapter", true, "Hubot");
3536
robot.logger = new Logger(true);

test/test-st2bot-envvars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/*global describe, it, before, after, beforeEach, afterEach*/
1818
'use strict';
1919
//import Robot from 'hubot/src/Robot';
20-
const Robot = await import("hubot/src/Robot.mjs");
2120

2221
var chai = require("chai"),
2322
expect = chai.expect,
@@ -29,7 +28,8 @@ var chai = require("chai"),
2928

3029
chai.use(sinonChai);
3130

32-
describe("environment variable configuration", function () {
31+
describe("environment variable configuration", async function () {
32+
const Robot = await import("hubot/src/Robot.mjs");
3333
var robot = new Robot(null, "mock-adapter", false, "Hubot");
3434
robot.logger = new Logger(true);
3535
var restore_env = null,

test/test-st2bot-setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"use strict";
1919

2020
//import Robot from 'hubot/src/Robot';
21-
const Robot = await import("hubot/src/Robot.mjs");
2221

2322
var expect = require("chai").expect,
2423
path = require("path"),
@@ -35,7 +34,8 @@ var disableAuth = function() {
3534
process.env.ST2_AUTH_PASSWORD = '';
3635
};
3736

38-
describe("stanley the StackStorm bot", function() {
37+
describe("stanley the StackStorm bot", async function() {
38+
const Robot = await import("hubot/src/Robot.mjs");
3939
var robot, user, adapter, st2bot, stop;
4040

4141
before(function(done) {

test/test-st2bot-sigusr2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/*global describe, it, afterEach*/
1818
'use strict';
1919
//import Robot from 'hubot/src/Robot';
20-
const Robot = await import("hubot/src/Robot.mjs");
2120

2221
var chai = require("chai"),
2322
expect = chai.expect,
@@ -29,7 +28,8 @@ var chai = require("chai"),
2928

3029
chai.use(sinonChai);
3130

32-
describe("SIGUSR2", function () {
31+
describe("SIGUSR2", async function () {
32+
const Robot = await import("hubot/src/Robot.mjs");
3333
var robot = new Robot(null, "mock-adapter", false, "Hubot");
3434
robot.logger = new Logger(true);
3535
var debug_spy = sinon.spy(robot.logger, 'debug'),

test/test-twofactor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
/*global describe, it, before, after*/
1818
"use strict";
1919
//import Robot from 'hubot/src/Robot';
20-
const Robot = await import("hubot/src/Robot.mjs");
2120

2221
var fs = require('fs'),
2322
expect = require("chai").expect,
@@ -39,7 +38,8 @@ var enableTwofactor = function() {
3938
process.env.HUBOT_2FA = 'somepack.twofactor_action';
4039
};
4140

42-
describe("two-factor auth module", function() {
41+
describe("two-factor auth module", async function() {
42+
const Robot = await import("hubot/src/Robot.mjs");
4343
var robot, user, adapter, st2bot, stop, command_factory;
4444

4545
before(function(done) {

0 commit comments

Comments
 (0)