Skip to content

Commit 32fce8d

Browse files
author
Andrey Fel
committed
Fix getBrowserId tests
The behavior was changed here but the tests were not updated accordingly: #750
1 parent 1f2db28 commit 32fce8d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

node-tests/unit/utils/test-page-helper-test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ describe('TestPageHelper', function () {
4747
test_page: 'loadBalance&browser=1',
4848
},
4949
};
50-
assert.strictEqual(getBrowserId(launcher), 1);
50+
assert.strictEqual(getBrowserId(launcher), '1');
5151
});
5252

5353
it('should throw an error if the launcher does not have test page set', function () {
54+
const warnStub = sinon.stub(console, 'warn');
5455
const launcher = {
5556
foo: 'bar',
5657
};
57-
assert.throws(() => {
58-
getBrowserId(launcher);
59-
}, /Launcher Settings:/);
58+
assert.strictEqual(getBrowserId(launcher), 0);
59+
sinon.assert.calledOnce(warnStub);
60+
sinon.assert.calledWithMatch(warnStub, /Launcher Settings:/);
61+
warnStub.restore();
6062
});
6163
});
6264

0 commit comments

Comments
 (0)