mirror of
https://github.com/lancedikson/bowser
synced 2026-02-09 17:40:09 +00:00
Simplify Brave descriptor and use valid version 144
Co-authored-by: naorpeled <6171622+naorpeled@users.noreply.github.com>
This commit is contained in:
parent
83197a0dad
commit
94bd4b51fd
@ -1031,7 +1031,6 @@ const browsersList = [
|
||||
name: 'Brave',
|
||||
};
|
||||
|
||||
// Try Client Hints brand version first
|
||||
if (parser) {
|
||||
const hintsVersion = parser.getBrandVersion('Brave');
|
||||
if (hintsVersion) {
|
||||
|
||||
@ -386,7 +386,7 @@ test('Parser with Edge client hints', (t) => {
|
||||
|
||||
const BRAVE_HINTS = {
|
||||
brands: [
|
||||
{ brand: 'Brave', version: '1.73.97' },
|
||||
{ brand: 'Brave', version: '144' },
|
||||
{ brand: 'Chromium', version: '131' },
|
||||
{ brand: 'Not_A Brand', version: '24' },
|
||||
],
|
||||
@ -400,7 +400,7 @@ const BRAVE_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (
|
||||
test('Parser detects Brave from client hints brands', (t) => {
|
||||
const p = new Parser(BRAVE_UA, false, BRAVE_HINTS);
|
||||
t.is(p.getBrowserName(), 'Brave');
|
||||
t.is(p.getBrowserVersion(), '1.73.97');
|
||||
t.is(p.getBrowserVersion(), '144');
|
||||
});
|
||||
|
||||
test('Parser.hasBrand detects Brave', (t) => {
|
||||
@ -411,5 +411,5 @@ test('Parser.hasBrand detects Brave', (t) => {
|
||||
|
||||
test('Parser.getBrandVersion returns version for Brave', (t) => {
|
||||
const p = new Parser(BRAVE_UA, false, BRAVE_HINTS);
|
||||
t.is(p.getBrandVersion('Brave'), '1.73.97');
|
||||
t.is(p.getBrandVersion('Brave'), '144');
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user