1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Add OS parsing

This commit is contained in:
Denis Demchenko
2017-04-15 22:46:18 +03:00
parent c50d0449d3
commit b057077b68
3 changed files with 81 additions and 3 deletions

View File

@@ -33,3 +33,18 @@ test('getBrowserName', t => {
test('getBrowserVersion', t => {
t.is(parser.getBrowserVersion(), '43.0.2442.1165');
});
test('_parseOS', t => {
const spy = sinon.spy(parser, '_parseOS');
parser.getOS();
t.truthy(spy.called);
parser._parseOS.restore();
});
test('getOSName', t => {
t.is(parser.getOSName(), 'macOS');
});
test('getOSVersion', t => {
t.is(parser.getOSVersion(), '10.12.4');
});