Skip to content

Commit 194e3a8

Browse files
author
Eduardo García Sanz
committed
more tests...
1 parent cad64ab commit 194e3a8

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

test/socket.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('The socket', function () {
8181
}).should.throw('There is no "faa" socket mounted.');
8282
});
8383

84-
it('return a socket by its name and throws an removes it on unmount', function () {
84+
it('returns a socket by its name and throws an removes it on unmount', function () {
8585

8686
var props = {
8787
url : 'foo:9000',
@@ -90,7 +90,7 @@ describe('The socket', function () {
9090

9191
var rendered = render(props);
9292

93-
MockedSocket.socket('fin').should.be.ok;
93+
MockedSocket.socket('fin').should.be.ok();
9494

9595
rendered.unmount();
9696

@@ -100,4 +100,20 @@ describe('The socket', function () {
100100

101101
}).should.throw('There is no "fin" socket mounted.');
102102
});
103+
104+
it('mounts a default named socket', function () {
105+
106+
var props = {
107+
url : 'http://wwww.somthinghere.fun:8080'
108+
};
109+
110+
var rendered = render(props),
111+
a = MockedSocket.socket(),
112+
b = MockedSocket.socket('default');
113+
114+
a.should.be.ok();
115+
a.should.equal(b);
116+
117+
rendered.unmount();
118+
});
103119
});

0 commit comments

Comments
 (0)