Commit a22a3791 authored by samy's avatar samy
Browse files

fix PR comments

parent 04b20ff7
Pipeline #4504 passed with stage
in 36 seconds
...@@ -74,18 +74,12 @@ describe('client/lib/reco', () => { ...@@ -74,18 +74,12 @@ describe('client/lib/reco', () => {
expect(global.robotLib.reco).toBeDefined(); expect(global.robotLib.reco).toBeDefined();
}); });
test('should make init ', () => {
const confId = 'testConf';
const reco = global.robotLib.reco(config);
expect(reco.start(confId)).toBe(true);
expect(request[0]).not.toBeNull();
});
test('should make a correct REST call on start', () => { test('should make a correct REST call on start', () => {
const confId = 'testConf'; const confId = 'testConf';
const urlExpected = 'http://localhost:8080/stream?action=START&id=' + confId; const urlExpected = 'http://localhost:8080/stream?action=START&id=' + confId;
const reco = global.robotLib.reco(config); const reco = global.robotLib.reco(config);
reco.start(confId); const result = reco.start(confId);
expect(result).toBe(true);
expect(request[0].method).toBe('GET'); expect(request[0].method).toBe('GET');
expect(request[0].url).toBe(urlExpected); expect(request[0].url).toBe(urlExpected);
}); });
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"devDependencies": { "devDependencies": {
"jest": "20.0.0", "jest": "20.0.0",
"xo": "0.18.2", "xo": "0.18.2",
"sinon": "^4.0.2", "sinon": "^4.0.2"
}, },
"author": "Linagora Folks", "author": "Linagora Folks",
"license": "AGPL-3.0", "license": "AGPL-3.0",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment