Skip to content

Commit eaa78ed

Browse files
committed
Add tests
1 parent 6ded0a8 commit eaa78ed

2 files changed

Lines changed: 31 additions & 6 deletions

File tree

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
"url": "undefined/blob/master/LICENSE-MIT"
1717
}
1818
],
19-
"dependencies": {
20-
},
19+
"dependencies": {},
2120
"devDependencies": {
2221
"chai": "~1.9.0",
2322
"coffee-script": "^1.8.0",
24-
"mocha": "~1.21.0"
23+
"mocha": "~1.21.0",
24+
"msgflo": "^0.3.0"
2525
},
2626
"keywords": [],
27-
"bin": {
28-
},
27+
"bin": {},
2928
"scripts": {
30-
"test": ""
29+
"test": "mocha --reporter spec --compilers coffee:coffee-script/register spec/*.coffee"
3130
}
3231
}

spec/participant.coffee

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
msgflo = require 'msgflo'
2+
path = require 'path'
3+
chai = require 'chai' unless chai
4+
heterogenous = require '../node_modules/msgflo/spec/heterogenous.coffee'
5+
6+
participants =
7+
'C++Repeat': [path.join __dirname, '..', 'build', './repeat-cpp']
8+
9+
describe 'Participants', ->
10+
address = 'amqp://localhost'
11+
g =
12+
broker: null
13+
commands: participants
14+
15+
beforeEach (done) ->
16+
g.broker = msgflo.transport.getBroker address
17+
g.broker.connect done
18+
afterEach (done) ->
19+
g.broker.disconnect done
20+
21+
names = Object.keys g.commands
22+
names.forEach (name) ->
23+
heterogenous.testParticipant g, name
24+
25+
26+

0 commit comments

Comments
 (0)