Skip to content

Commit

Permalink
Tests: enable test-UA-no-WebRTC tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Oct 27, 2017
1 parent 93da1b1 commit ec232af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Expand Up @@ -99,8 +99,8 @@ gulp.task('test', function()
'test/test-classes.js',
'test/test-normalizeTarget.js',
'test/test-parser.js',
'test/test-properties.js'
// 'test/test-UA-no-WebRTC.js'
'test/test-properties.js',
'test/test-UA-no-WebRTC.js'
];

return gulp.src(src)
Expand Down
15 changes: 8 additions & 7 deletions test/include/testUA.js
@@ -1,12 +1,13 @@
module.exports = {
SOCKET_DESCRIPTION : {
'via_transport' : 'WS',
'sip_uri' : 'sip:localhost:12345;transport=ws',
'url' : 'ws://localhost:12345'
},

UA_CONFIGURATION : {
uri : 'sip:f%61keUA@jssip.net',
password : '1234ññññ',
'sockets' : [ {
'via_transport' : 'WS',
'sip_uri' : 'sip:localhost:12345;transport=ws',
'url' : 'ws://localhost:12345'
} ],
uri : 'sip:f%61keUA@jssip.net',
password : '1234ññññ',
display_name : 'Fake UA ð→€ł !!!',
authorization_user : 'fakeUA',
instance_id : 'uuid:8f1fa16a-1165-4a96-8341-785b1ef24f12',
Expand Down
10 changes: 7 additions & 3 deletions test/test-UA-no-WebRTC.js
Expand Up @@ -12,7 +12,8 @@ module.exports = {
test.throws(
function()
{
JsSIP.UA({ 'lalala': 'lololo' });
/* eslint no-unused-vars: 0*/
const ua = new JsSIP.UA({ 'lalala': 'lololo' });
},
JsSIP.Exceptions.ConfigurationError
);
Expand All @@ -22,9 +23,12 @@ module.exports = {

'UA no WS connection' : function(test)
{
const ua = new JsSIP.UA(testUA.UA_CONFIGURATION);
const config = testUA.UA_CONFIGURATION;
const wsSocket = new JsSIP.WebSocketInterface(testUA.SOCKET_DESCRIPTION.url);

console.log('LALALALALALA');
config.sockets = wsSocket;

const ua = new JsSIP.UA(config);

test.ok(ua instanceof(JsSIP.UA));

Expand Down

0 comments on commit ec232af

Please sign in to comment.