From 48738e08df00c7ad7d717ba9e2dc116cf2a6c071 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Fri, 29 Mar 2024 06:25:02 -0700 Subject: [PATCH] test: fix unit test to have a string version in userAgentData which would have prevented #1151 --- test/unit/detectBrowser.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/detectBrowser.test.js b/test/unit/detectBrowser.test.js index eb67a2b8..8bf3c2b1 100644 --- a/test/unit/detectBrowser.test.js +++ b/test/unit/detectBrowser.test.js @@ -50,7 +50,7 @@ describe('detectBrowser', () => { }); it('detects Chrome if navigator.userAgentData exists', () => { - navigator.userAgentData = {brands: [{brand: 'Chromium', version: 102}]}; + navigator.userAgentData = {brands: [{brand: 'Chromium', version: '102'}]}; // Use the wrong UA string for Firefox. navigator.userAgent = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; ' + 'rv:44.0) Gecko/20100101 Firefox/44.0';