Skip to content

Commit

Permalink
test: fix unit test to have a string version in userAgentData
Browse files Browse the repository at this point in the history
which would have prevented #1151
  • Loading branch information
fippo committed Mar 29, 2024
1 parent 548d85d commit 48738e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/detectBrowser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 48738e0

Please sign in to comment.