Skip to content

Commit

Permalink
Added passing test for #18
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jan 24, 2013
1 parent df7d4c6 commit 6b217bb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/eventsource_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ exports['Messages'] = {
done();
},

'issue-18': function(test) {
createServer(["id: 1\ndata: hello world\n\n"], function(close) {
var es = new EventSource('http://localhost:' + port);
es.onmessage = function(m) {
test.equal("hello world", m.data);
es.close();
close(test.done);
};
});
},

'one one-line message in one chunk': function(test) {
createServer(["data: Hello\n\n"], function(close) {
var es = new EventSource('http://localhost:' + port);
Expand Down

0 comments on commit 6b217bb

Please sign in to comment.