Commit Graph

181 Commits

Author SHA1 Message Date
Damien Arrachequesne
15a52ab721 test: remove arrow function (for now)
It was included by the previous commit, but the test code is not
currently transpiled to ES5 so it breaks IE in the CI.

Let's use a plain function for now.
2020-09-30 16:11:54 +02:00
Luke Olney
050108b228 fix: fix reconnection after opening socket asynchronously (#1253)
Closes https://github.com/socketio/socket.io/issues/3358
2020-09-30 16:01:15 +02:00
Damien Arrachequesne
0fe9439ff6 [fix] Fire an error event on middleware failure for non-root namespace (#1202)
In the following example:

```js
io.use((socket, next) => {
  next(new Error('Auth failed'));
});

// client-side
const socket = io('https://url/custom-namespace');

socket.on('error', (err) => {
  // ...
});
```

The 'error' event wasn't fired on the custom namespace.
2018-05-17 22:53:37 +02:00
Damien Arrachequesne
3d8f24e94f [test] Update travis configuration 2018-03-01 02:23:26 +01:00
Damien Arrachequesne
57cee214fb [test] Remove IE6 and IE7 tests (#1164)
Related: https://wiki.saucelabs.com/pages/viewpage.action?pageId=70074721
2017-10-22 15:08:16 +02:00
Damien Arrachequesne
8091591422 [fix] Do not update the opts.query reference (#1121) 2017-06-01 12:35:31 +02:00
Damien Arrachequesne
fcb5c43ffe [fix] Add nsp prefix to socket.id (#1058)
So the socket ids on the client and on the server are equals.
2017-01-13 16:53:44 +01:00
Zheng Weihan
4578f7ed35 Merge branch 'orgmaster' into queryStringFix
* orgmaster: (44 commits)
  bump zuul
  Remove jspm browser config
  Run lint before test instead of before build
  ESlint manual fix
  Eslint autofix
  Add env to eslintrc
  Exclude generated files from linting
  updated babel-eslint dep to 4.1.7 (4.1.6 broken)
  refactor gulpfile
  Add eslint to gulpfile and create gulp task default
  fixed regex
  Rename gulp task webpack to build
  Remove commented make recipe
  removed babel react preset
  Makefile use gulp from node_modules instead of global
  Remove browserify stuff, add zuul-builder-webpack devDep
  Migrate zuul config from yml to js
  Refactor webpack config out to support/webpack.config.js
  removed ide-specific entries from gitignore
  updated makefile to use gulp commands
  ...

Conflicts:
	lib/manager.js
	lib/socket.js
2016-04-12 19:17:09 +08:00
Diga Widyaprana
c51a930a2c ESlint manual fix 2016-02-28 02:36:06 +08:00
Diga Widyaprana
d1cbc68ea7 Eslint autofix 2016-02-28 02:36:06 +08:00
Diga Widyaprana
51ad3c1ee0 Add env to eslintrc
- node env at root eslintrc
- mocha env at test/ eslintrc
2016-02-28 02:36:06 +08:00
whattokingu
f01a349af8 add back changes made in previous commit
previous commit [here](3407f3f522).
2016-02-16 00:37:05 +08:00
whattokingu
bfa458941c fix error with test. 2016-02-13 13:50:43 +08:00
whattokingu
e0580ef475 Merge pull request #10 from whattokingu/queryStringFix
Query string fix
2016-02-13 13:47:53 +08:00
Zheng Weihan
e3c0f6a41e encodes queries using encodeURIComponent 2016-02-13 13:27:04 +08:00
Zhu Liang
3407f3f522 update test 2016-02-01 13:50:11 +08:00
Zhu Liang
b14018eed6 fixed test case 2016-02-01 13:00:13 +08:00
Zheng Weihan
1657971d8c remove console statement. 2016-01-31 16:07:21 +08:00
Zheng Weihan
9fa6b1c6d2 update tests 2016-01-31 15:33:16 +08:00
Zheng Weihan
3290bb43f1 move encoding of query string to lookup function.
handles passing of query via query strings
add tests for functionality
2016-01-31 15:29:49 +08:00
Guillermo Rauch
5ccf58873b Merge pull request #924 from nkzawa/patch-25
Enable to run all tests on nodejs
2015-12-03 09:06:49 -08:00
nkzawa
6ee4283da0 enable to run all tests on nodejs 2015-12-03 19:37:30 +09:00
nkzawa
41956806a7 fix a socket can't connect while disconnecting a different one 2015-12-03 17:44:47 +09:00
Guillermo Rauch
64e65aae7e Merge pull request #921 from nkzawa/patch-21
Fix an unstable test
2015-12-02 09:55:22 -08:00
nkzawa
18be967adb ipv6 support 2015-12-03 00:09:31 +09:00
nkzawa
3313401082 fix an unstable test 2015-12-02 13:13:07 +09:00
nkzawa
bc764aeaac add a test for the case reconnection doesn't work 2015-09-03 02:21:12 +09:00
Guillermo Rauch
adbd0e3e36 added support for ping and pong events
https://github.com/Automattic/socket.io/issues/1951
2015-04-05 15:45:17 -07:00
Guillermo Rauch
2a2866b049 proper handling of disconnection while in opening state 2015-04-05 12:20:13 -07:00
Guillermo Rauch
1e8e125d13 instrumentation / style tweaks 2015-04-05 12:19:51 -07:00
Guillermo Rauch
ffc12af647 added tests for same-namespace new connection handling (https://github.com/Automattic/socket.io/issues/1956) 2015-04-05 12:18:50 -07:00
Guillermo Rauch
210d65d9dd Merge pull request #803 from masakij/fix-port-hint
Fix port hint
2015-01-30 09:54:15 -08:00
Naoyuki Kanezawa
b15404e218 support compression 2015-01-22 06:51:49 +09:00
masakij
ecf6c4e139 ADD: location.port test
1 failing
1. Error: expected '443' to equal '3000'
2015-01-20 16:13:31 +09:00
Tony Kovanen
5d96f92940 Make sure socket.id is defined 2015-01-17 22:20:00 +02:00
Tony Kovanen
b0c4c2edd0 Added socket.id property
- Make sure `socket.id` is defined on connect
- Make sure `socket.id` is cleared on disconnect
- Make sure `socket.id` is updated on reconnect
2015-01-14 18:18:02 +02:00
Guillermo Rauch
f9276e9674 Merge pull request #797 from Automattic/fix-default-url
fix url parsing when uri string is undefined
2015-01-11 15:13:17 -08:00
Roman Shtylman
3f139c8863 test: make url tests run on the browser 2015-01-11 15:05:12 -08:00
Roman Shtylman
1e899abd45 fix url parsing when uri string is undefined
The url parser was ignoring port hints from window.location when the uri
string was undefined. This commit changes the parser to use
window.location.host (not hostname) so that the port is preserved.
2015-01-11 13:10:36 -08:00
Mark Mokryn
e8c5779af6 improve fix for GH-786 plus test it and also backoff 2014-11-23 16:50:21 +02:00
Tony Kovanen
361acede8e Increase timeout.
Increased timeout in tests before closing the manager engine so
reconnects will take place with more certainty.
2014-10-19 22:10:49 +03:00
Tony Kovanen
b5d808e0d6 Merge pull request #767 from nkzawa/patch-12
fix reconnection after reconnecting manually
2014-10-19 13:52:43 +03:00
Naoyuki Kanezawa
bf1fb628df fix reconnection after reconnecting manually 2014-10-19 12:14:18 +09:00
Naoyuki Kanezawa
a8b3fbea55 enable to stop reconnecting 2014-10-19 12:11:30 +09:00
Tony Kovanen
baf60c1502 Merge pull request #732 from nkzawa/patch-10
Enable to reconnect manually
2014-09-21 14:18:50 -06:00
Guillermo Rauch
7912f14c94 Merge pull request #754 from toshipon/patch-1
Support no schema relative url
2014-09-11 17:56:17 +03:00
Guillermo Rauch
fca25797a3 register other nsps 2014-09-04 12:28:29 +02:00
Guillermo Rauch
ae7c5ac007 fix tests 2014-09-04 12:20:45 +02:00
toshipon
6a9144c226 Support no schema relative url 2014-08-30 18:43:32 +09:00
Tony Kovanen
4e2edde13b Further increase test timeout. 2014-08-26 00:59:47 +03:00