hubot 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/adapters/shell.js +5 -0
- package/src/robot.js +1 -1
- package/test/robot_test.js +17 -0
package/package.json
CHANGED
package/src/adapters/shell.js
CHANGED
|
@@ -17,6 +17,11 @@ const historyPath = '.hubot_history'
|
|
|
17
17
|
const bold = str => `\x1b[1m${str}\x1b[22m`
|
|
18
18
|
|
|
19
19
|
class Shell extends Adapter {
|
|
20
|
+
constructor (robot) {
|
|
21
|
+
super(robot)
|
|
22
|
+
this.name = 'Shell'
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
send (envelope/* , ...strings */) {
|
|
21
26
|
const strings = [].slice.call(arguments, 1)
|
|
22
27
|
|
package/src/robot.js
CHANGED
package/test/robot_test.js
CHANGED
|
@@ -1083,6 +1083,23 @@ describe('Robot', function () {
|
|
|
1083
1083
|
})
|
|
1084
1084
|
})
|
|
1085
1085
|
|
|
1086
|
+
describe('Robot Defaults', () => {
|
|
1087
|
+
let robot = null
|
|
1088
|
+
beforeEach(async () => {
|
|
1089
|
+
process.env.EXPRESS_PORT = 0
|
|
1090
|
+
robot = new Robot(null, true, 'TestHubot')
|
|
1091
|
+
robot.alias = 'Hubot'
|
|
1092
|
+
await robot.loadAdapter()
|
|
1093
|
+
robot.run()
|
|
1094
|
+
})
|
|
1095
|
+
afterEach(() => {
|
|
1096
|
+
robot.shutdown()
|
|
1097
|
+
})
|
|
1098
|
+
it('should load the builtin shell adapter by default', async () => {
|
|
1099
|
+
expect(robot.adapter.name).to.equal('Shell')
|
|
1100
|
+
})
|
|
1101
|
+
})
|
|
1102
|
+
|
|
1086
1103
|
describe('Robot ES6', () => {
|
|
1087
1104
|
let robot = null
|
|
1088
1105
|
beforeEach(async () => {
|