diff --git a/test/fixtures/__tests__/scenarioManager.js b/test/fixtures/__tests__/scenarioManager.js index 3c8d261c4c85..65d4af767df1 100644 --- a/test/fixtures/__tests__/scenarioManager.js +++ b/test/fixtures/__tests__/scenarioManager.js @@ -108,12 +108,40 @@ describe('scenario manager', function () { }); }); - it('should throw an error if the scenario is not defined', function () { - expect(manager.load).withArgs('makelogs').to.throwError(); + describe('load', function () { + it('should reject if the scenario is not specified', function () { + return manager.load() + .then(function () { + throw new Error('Promise should reject') + }) + .catch(function () { return; }); + }); + + it('should reject if the scenario is not defined', function () { + return manager.load('idonotexist') + .then(function () { + throw new Error('Promise should reject') + }) + .catch(function () { return; }); + }); }); - it('should throw an error if an index is not defined when clearing', function () { - expect(manager.unload).to.throwError(); + describe('unload', function () { + it('should reject if the scenario is not specified', function () { + return manager.unload() + .then(function () { + throw new Error('Promise should reject') + }) + .catch(function () { return; }); + }); + + it('should reject if the scenario is not defined', function () { + return manager.unload('idonotexist') + .then(function () { + throw new Error('Promise should reject') + }) + .catch(function () { return; }); + }); }); it('should throw an error if an es server is not specified', function () { diff --git a/test/utils/__tests__/getPage.js b/test/utils/__tests__/getPage.js index 9018e33541ca..19ce3a1fae24 100644 --- a/test/utils/__tests__/getPage.js +++ b/test/utils/__tests__/getPage.js @@ -10,7 +10,7 @@ describe('getUrl', function () { pathname: 'foo' }); - expect(url).to.be('http://localhost:9220/foo'); + expect(url).to.be('http://localhost/foo'); }); it('should convert to a secure url with port', function () {