Permalink
Browse files
Use sockets properly in tests
- Loading branch information...
Showing
with
14 additions
and
14 deletions.
-
+4
−4
spec/CollectGroups.coffee
-
+6
−6
spec/CollectTree.coffee
-
+4
−4
spec/ReadGroup.coffee
|
@@ -13,10 +13,10 @@ describe 'CollectGroups component', -> |
|
|
|
|
|
beforeEach ->
|
|
|
c = CollectGroups.getComponent()
|
|
|
- c.inPorts.in.attach noflo.internalSocket.createSocket()
|
|
|
- c.outPorts.out.attach noflo.internalSocket.createSocket()
|
|
|
- ins = c.inPorts.in
|
|
|
- out = c.outPorts.out
|
|
|
+ ins = noflo.internalSocket.createSocket()
|
|
|
+ out = noflo.internalSocket.createSocket()
|
|
|
+ c.inPorts.in.attach ins
|
|
|
+ c.outPorts.out.attach out
|
|
|
|
|
|
describe 'when instantiated', ->
|
|
|
it 'should have input ports', ->
|
|
|
|
@@ -14,12 +14,12 @@ describe 'CollectTree component', -> |
|
|
|
|
|
beforeEach ->
|
|
|
c = CollectTree.getComponent()
|
|
|
- c.inPorts.in.attach noflo.internalSocket.createSocket()
|
|
|
- c.outPorts.out.attach noflo.internalSocket.createSocket()
|
|
|
- c.outPorts.error.attach noflo.internalSocket.createSocket()
|
|
|
- ins = c.inPorts.in
|
|
|
- out = c.outPorts.out
|
|
|
- err = c.outPorts.error
|
|
|
+ ins = noflo.internalSocket.createSocket()
|
|
|
+ out = noflo.internalSocket.createSocket()
|
|
|
+ err = noflo.internalSocket.createSocket()
|
|
|
+ c.inPorts.in.attach ins
|
|
|
+ c.outPorts.out.attach out
|
|
|
+ c.outPorts.error.attach err
|
|
|
|
|
|
describe 'without any groups provided', ->
|
|
|
it 'should send an error and no data', (done) ->
|
|
|
|
@@ -13,10 +13,10 @@ describe 'ReadGroup component', -> |
|
|
|
|
|
beforeEach ->
|
|
|
c = ReadGroup.getComponent()
|
|
|
- c.inPorts.in.attach noflo.internalSocket.createSocket()
|
|
|
- c.outPorts.group.attach noflo.internalSocket.createSocket()
|
|
|
- ins = c.inPorts.in
|
|
|
- group = c.outPorts.group
|
|
|
+ ins = noflo.internalSocket.createSocket()
|
|
|
+ group = noflo.internalSocket.createSocket()
|
|
|
+ c.inPorts.in.attach ins
|
|
|
+ c.outPorts.group.attach group
|
|
|
|
|
|
describe 'when instantiated', ->
|
|
|
it 'should have input ports', ->
|
|
|
0 comments on commit
e2dd335