Improve OS detection: fix Linux arch mistakenly detected as version

This commit is contained in:
Faisal Salman
2024-12-23 15:29:50 +07:00
parent 9e64f34e72
commit 3ca23193dd
3 changed files with 13 additions and 4 deletions

View File

@@ -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', () => {