Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
, "dependencies": {
"socket.io-client": "0.9.6"
, "policyfile": "0.0.4"
, "redis": "0.6.7"
, "redis": "0.7.2"
}
, "devDependencies": {
"expresso": "0.9.2"
, "should": "0.0.4"
, "should": "0.6.3"
, "benchmark": "0.2.2"
, "microtime": "0.1.3-1"
, "colors": "0.5.1"
Expand Down
12 changes: 6 additions & 6 deletions test/parser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = {
'decoding json packet with message id and ack data': function () {
parser.decodePacket('4:1+::{"a":"b"}').should.eql({
type: 'json'
, id: 1
, id: '1'
, ack: 'data'
, endpoint: ''
, data: { a: 'b' }
Expand All @@ -114,7 +114,7 @@ module.exports = {
'decoding an event packet with message id and ack': function () {
parser.decodePacket('5:1+::{"name":"tobi"}').should.eql({
type: 'event'
, id: 1
, id: '1'
, ack: 'data'
, endpoint: ''
, name: 'tobi'
Expand Down Expand Up @@ -143,7 +143,7 @@ module.exports = {
'decoding a message packet with id and endpoint': function () {
parser.decodePacket('3:5:/tobi').should.eql({
type: 'message'
, id: 5
, id: '5'
, ack: true
, endpoint: '/tobi'
, data: ''
Expand Down Expand Up @@ -245,7 +245,7 @@ module.exports = {
'encoding json packet with message id and ack data': function () {
parser.encodePacket({
type: 'json'
, id: 1
, id: '1'
, ack: 'data'
, endpoint: ''
, data: { a: 'b' }
Expand All @@ -264,7 +264,7 @@ module.exports = {
'encoding an event packet with message id and ack': function () {
parser.encodePacket({
type: 'event'
, id: 1
, id: '1'
, ack: 'data'
, endpoint: ''
, name: 'tobi'
Expand Down Expand Up @@ -292,7 +292,7 @@ module.exports = {
'encoding a message packet with id and endpoint': function () {
parser.encodePacket({
type: 'message'
, id: 5
, id: '5'
, ack: true
, endpoint: '/tobi'
, data: ''
Expand Down
2 changes: 1 addition & 1 deletion test/static.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ module.exports = {

cl.get('/socket.io/socket.io.js', function (res, data) {
res.headers['content-type'].should.eql('application/javascript');
res.headers['content-length'].should.eql(13);
res.headers['content-length'].should.eql('13');
res.headers.etag.should.eql('1.0');

data.should.eql('custom_client');
Expand Down
12 changes: 6 additions & 6 deletions test/transports.flashsocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ module.exports = {
netConnection(port, function (err, data){
should.strictEqual(err, null);

data.toString().should.include.string('<cross-domain-policy>');
data.toString().should.match(/<cross-domain-policy>/);

this.destroy();
io.flashPolicyServer.close();
Expand Down Expand Up @@ -133,7 +133,7 @@ module.exports = {
netConnection(next, function (err, data){
should.strictEqual(err, null);

data.toString().should.include.string('<cross-domain-policy>');
data.toString().should.match(/<cross-domain-policy>/);

this.destroy();
io.flashPolicyServer.close();
Expand All @@ -152,14 +152,14 @@ module.exports = {

var server = io.flashPolicyServer;

server.origins.should.contain('google.com:80');
server.origins.should.include('google.com:80');
server.origins.should.not.contain('*.*');

io.set('origins', ['foo.bar:80', 'socket.io:1337']);
server.origins.should.not.contain('google.com:80');
server.origins.should.contain('foo.bar:80');
server.origins.should.contain('socket.io:1337');
server.buffer.toString('utf8').should.include.string('socket.io');
server.origins.should.include('foo.bar:80');
server.origins.should.include('socket.io:1337');
server.buffer.toString('utf8').should.match(/socket\.io/);

io.flashPolicyServer.close();
done();
Expand Down
2 changes: 1 addition & 1 deletion test/transports.xhr-polling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ module.exports = {
msgs.should.have.length(1);
msgs[0].should.eql({
type: 'ack'
, ackId: 1
, ackId: '1'
, endpoint: ''
, args: []
});
Expand Down