From 921dfe2e0517ec4e4b0fb2983fc8152500c15819 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Thu, 7 Mar 2024 19:44:36 +0100 Subject: [PATCH] update unit test --- test/unit/detectBrowser.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/detectBrowser.test.js b/test/unit/detectBrowser.test.js index 8f14ce19..eb67a2b8 100644 --- a/test/unit/detectBrowser.test.js +++ b/test/unit/detectBrowser.test.js @@ -49,7 +49,7 @@ describe('detectBrowser', () => { expect(browserDetails.version).toEqual(95); }); - it('detects Chrome if navigator.userAgentData exist', () => { + it('detects Chrome if navigator.userAgentData exists', () => { navigator.userAgentData = {brands: [{brand: 'Chromium', version: 102}]}; // Use the wrong UA string for Firefox. navigator.userAgent = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; ' + @@ -57,8 +57,8 @@ describe('detectBrowser', () => { navigator.mozGetUserMedia = function() {}; const browserDetails = detectBrowser(window); - expect(browserDetails.browser).to.equal('chrome'); - expect(browserDetails.version).to.equal(102); + expect(browserDetails.browser).toEqual('chrome'); + expect(browserDetails.version).toEqual(102); }); it('detects Safari if window.RTCPeerConnection exists', () => {