mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat: add userAgent property to Navigator's prototype (#14415)
This commit is contained in:
parent
20ee3110d8
commit
f82a79ffdb
10 changed files with 29 additions and 12 deletions
|
@ -4,3 +4,8 @@ import { assert } from "./test_util.ts";
|
|||
Deno.test(function navigatorNumCpus() {
|
||||
assert(navigator.hardwareConcurrency > 0);
|
||||
});
|
||||
|
||||
Deno.test(function navigatorUserAgent() {
|
||||
const pattern = /Deno\/\d+\.\d+\.\d+/;
|
||||
assert(pattern.test(navigator.userAgent));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue