feat: add userAgent property to Navigator's prototype (#14415)

This commit is contained in:
randomicon00 2022-05-14 11:00:02 +01:00 committed by GitHub
parent 20ee3110d8
commit f82a79ffdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 12 deletions

View file

@ -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));
});