Update formFactor -> formFactors, in accordance to the latest change in client hints spec

This commit is contained in:
Faisal Salman
2024-06-02 21:21:53 +07:00
parent 1a2ef00509
commit 8991d34e56
3 changed files with 15 additions and 15 deletions

View File

@@ -463,18 +463,18 @@ describe('Map UA-CH headers', function () {
});
});
it('Can detect form-factor from client-hints', function () {
it('Can detect form-factors from client-hints', function () {
const FFVR = {
'sec-ch-ua-form-factor' : '"VR"'
'sec-ch-ua-form-factors' : '"VR"'
};
const FFEInk = {
'sec-ch-ua-form-factor' : '"Tablet", "EInk"'
'sec-ch-ua-form-factors' : '"Tablet", "EInk"'
};
const FFUnknown = {
'sec-ch-ua-form-factor' : '"Unknown"'
'sec-ch-ua-form-factors' : '"Unknown"'
};
UAParser(FFVR).withClientHints().then(function (ua) {

View File

@@ -40,7 +40,7 @@ test('read client hints data', async ({ page }) => {
}
],
platform: 'New OS',
formFactor: 'New Form Factor'
formFactors: 'New Form Factor'
});
}
}