Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #514 from xmppjs/connection-issues
improve connection handling
- Loading branch information
Showing
67 changed files
with
800 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
{ | ||
"presets": ["es2015"], | ||
"plugins": [ | ||
["transform-react-jsx", { | ||
"pragma": "xml" | ||
}], | ||
["babel-plugin-jsx-pragmatic", { | ||
"module": "@xmpp/xml", | ||
"import": "xml" | ||
}] | ||
[ | ||
"transform-react-jsx", | ||
{ | ||
"pragma": "xml" | ||
} | ||
], | ||
[ | ||
"babel-plugin-jsx-pragmatic", | ||
{ | ||
"module": "@xmpp/xml", | ||
"import": "xml" | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ dist: trusty | |
language: node_js | ||
|
||
node_js: | ||
- '6' | ||
- '7' | ||
- '8' | ||
- '9' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"@xmpp/xml": "^0.3.0" | ||
}, | ||
"engines": { | ||
"node": ">= 6", | ||
"node": ">= 7.6.0", | ||
"npm": ">= 2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"@xmpp/xml": "^0.3.0" | ||
}, | ||
"engines": { | ||
"node": ">= 6", | ||
"node": ">= 7.6.0", | ||
"npm": ">= 2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use strict' | ||
|
||
const test = require('ava') | ||
const Client = require('../lib/Client') | ||
|
||
test('_findTransport', t => { | ||
class Transport { | ||
socketParameters(uri) { | ||
if (uri === 'a') { | ||
return uri | ||
} | ||
if (uri === 'b') { | ||
return undefined | ||
} | ||
throw new Error('foobar') | ||
} | ||
} | ||
|
||
const entity = new Client() | ||
entity.transports.push(Transport) | ||
t.is(entity._findTransport('a'), Transport) | ||
t.is(entity._findTransport('b'), undefined) | ||
t.is(entity._findTransport('c'), undefined) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.