mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-09-30 17:27:44 +03:00
Improve OS detection: fix Linux arch mistakenly detected as version
This commit is contained in:
@@ -5,7 +5,16 @@
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Linux",
|
||||
"version" : "x86_64"
|
||||
"version" : "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Linux",
|
||||
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1",
|
||||
"expect" :
|
||||
{
|
||||
"name" : "Linux",
|
||||
"version" : "undefined"
|
||||
}
|
||||
}
|
||||
]
|
@@ -68,7 +68,7 @@ describe('Map UA-CH headers', () => {
|
||||
assert.strictEqual(uap.engine.name, 'Blink');
|
||||
assert.strictEqual(uap.engine.version, '110.0.0.0');
|
||||
assert.strictEqual(uap.os.name, "Linux");
|
||||
assert.strictEqual(uap.os.version, "x86_64");
|
||||
assert.strictEqual(uap.os.version, undefined);
|
||||
});
|
||||
|
||||
it('Fallback to user-agent header when using `withClientHints()` but found no client hints-related headers', () => {
|
||||
@@ -90,7 +90,7 @@ describe('Map UA-CH headers', () => {
|
||||
assert.strictEqual(uap.engine.name, 'Blink');
|
||||
assert.strictEqual(uap.engine.version, '110.0.0.0');
|
||||
assert.strictEqual(uap.os.name, "Linux");
|
||||
assert.strictEqual(uap.os.version, "x86_64");
|
||||
assert.strictEqual(uap.os.version, undefined);
|
||||
});
|
||||
|
||||
it('Can detect Apple silicon from client hints data', () => {
|
||||
|
Reference in New Issue
Block a user