hubot 5.0.4 → 5.0.6

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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/src/robot.js +0 -11
  3. package/.editorconfig +0 -14
  4. package/.github/stale.yml +0 -23
  5. package/.github/workflows/nodejs-macos.yml +0 -26
  6. package/.github/workflows/nodejs-ubuntu.yml +0 -28
  7. package/.github/workflows/nodejs-windows.yml +0 -26
  8. package/.github/workflows/release.yml +0 -37
  9. package/bin/e2e-test.sh +0 -47
  10. package/docs/adapters/campfire.md +0 -79
  11. package/docs/adapters/development.md +0 -125
  12. package/docs/adapters/shell.md +0 -24
  13. package/docs/adapters.md +0 -27
  14. package/docs/deploying/azure.md +0 -97
  15. package/docs/deploying/bluemix.md +0 -111
  16. package/docs/deploying/heroku.md +0 -66
  17. package/docs/deploying/unix.md +0 -72
  18. package/docs/deploying/windows.md +0 -66
  19. package/docs/deploying.md +0 -11
  20. package/docs/implementation.md +0 -55
  21. package/docs/index.md +0 -125
  22. package/docs/patterns.md +0 -265
  23. package/docs/scripting.md +0 -1051
  24. package/examples/hubot-start.ps1 +0 -12
  25. package/examples/hubot.service +0 -27
  26. package/script/bootstrap +0 -3
  27. package/script/release +0 -44
  28. package/script/server +0 -3
  29. package/script/smoke-test +0 -3
  30. package/script/test +0 -3
  31. package/test/adapter_test.js +0 -97
  32. package/test/brain_test.js +0 -336
  33. package/test/datastore_test.js +0 -154
  34. package/test/es2015_test.js +0 -199
  35. package/test/fixtures/MockAdapter.coffee +0 -10
  36. package/test/fixtures/MockAdapter.mjs +0 -43
  37. package/test/fixtures/TestScript.coffee +0 -9
  38. package/test/fixtures/TestScript.js +0 -13
  39. package/test/fixtures/mock-adapter.js +0 -35
  40. package/test/listener_test.js +0 -379
  41. package/test/message_test.js +0 -46
  42. package/test/middleware_test.js +0 -507
  43. package/test/robot_test.js +0 -1153
  44. package/test/shell_test.js +0 -73
  45. package/test/user_test.js +0 -29
@@ -1,73 +0,0 @@
1
- 'use strict'
2
-
3
- /* global describe, beforeEach, it */
4
-
5
- const chai = require('chai')
6
- const sinon = require('sinon')
7
- chai.use(require('sinon-chai'))
8
-
9
- const expect = chai.expect
10
-
11
- const Robot = require('../src/robot')
12
-
13
- describe('Shell Adapter', function () {
14
- beforeEach(async function () {
15
- this.robot = new Robot('shell', false, 'TestHubot')
16
- await this.robot.loadAdapter()
17
- this.robot.run()
18
- })
19
-
20
- this.afterEach(function () {
21
- this.robot.shutdown()
22
- })
23
-
24
- describe('Public API', function () {
25
- beforeEach(function () {
26
- this.adapter = this.robot.adapter
27
- })
28
-
29
- it('assigns robot', function () {
30
- expect(this.adapter.robot).to.equal(this.robot)
31
- })
32
-
33
- it('sends a message', function () {
34
- this.adapter.send = sinon.spy()
35
- this.adapter.send({ room: 'general' }, 'hello')
36
-
37
- expect(this.adapter.send).to.have.been.calledWith({ room: 'general' }, 'hello')
38
- })
39
-
40
- it('emotes a message', function () {
41
- this.adapter.send = sinon.spy()
42
- this.adapter.emote({ room: 'general' }, 'hello')
43
-
44
- expect(this.adapter.send).to.have.been.calledWith({ room: 'general' }, '* hello')
45
- })
46
-
47
- it('replies to a message', function () {
48
- this.adapter.send = sinon.spy()
49
- this.adapter.reply({ room: 'general', user: { name: 'mocha' } }, 'hello')
50
-
51
- expect(this.adapter.send).to.have.been.calledWith({ room: 'general', user: { name: 'mocha' } }, 'mocha: hello')
52
- })
53
-
54
- it('runs the adapter and emits connected', function (done) {
55
- const connected = () => {
56
- this.adapter.off('connected', connected)
57
- done()
58
- }
59
- this.adapter.on('connected', connected)
60
- this.adapter.run()
61
- })
62
- })
63
-
64
- it('dispatches received messages to the robot', function () {
65
- this.robot.receive = sinon.spy()
66
- this.adapter = this.robot.adapter
67
- this.message = sinon.spy()
68
-
69
- this.adapter.receive(this.message)
70
-
71
- expect(this.robot.receive).to.have.been.calledWith(this.message)
72
- })
73
- })
package/test/user_test.js DELETED
@@ -1,29 +0,0 @@
1
- 'use strict'
2
-
3
- /* global describe, it */
4
-
5
- const expect = require('chai').expect
6
- const User = require('../src/user')
7
-
8
- describe('User', () =>
9
- describe('new', function () {
10
- it('uses id as the default name', function () {
11
- const user = new User('hubot')
12
-
13
- expect(user.name).to.equal('hubot')
14
- })
15
-
16
- it('sets attributes passed in', function () {
17
- const user = new User('hubot', { foo: 1, bar: 2 })
18
-
19
- expect(user.foo).to.equal(1)
20
- expect(user.bar).to.equal(2)
21
- })
22
-
23
- it('uses name attribute when passed in, not id', function () {
24
- const user = new User('hubot', { name: 'tobuh' })
25
-
26
- expect(user.name).to.equal('tobuh')
27
- })
28
- })
29
- )