Monday, 17 April 2017

doing a mocha Test for ARI file?

I wish doing a test for ARI ! but i cant have a request for connection with asterisk . whene i run my file with node its ok , but if i run it with mocha no result !

let chai = require('chai');
let request = require('request');
let uuid = require('uuid');
let should = chai.should();
let ari = require('ari-client');
let expect = chai.expect;
let sinon = require('sinon');

describe('Tests originationDevice ', function () {

it(" should make a call ", function (done) {

    ari.connect("http://192.168.0.62:8088", "username", "password")
        .then(function (ari) {
            console.log('its okey');
        })
        .catch(function (err) {
            console.log('errrror');
        });        

 done();

}); });



via Saad Al Bazzari

No comments:

Post a Comment