From 734cf781c6e606a8a836863a391c94cf4fad22d7 Mon Sep 17 00:00:00 2001 From: Vincent LE GOFF Date: Mon, 8 Apr 2019 22:22:40 +0200 Subject: Allow high precision performance.now() (#1977) --- tests/025_high_precision.test | 2 ++ tests/025_high_precision.ts | 3 +++ tests/025_high_precision.ts.out | 2 ++ 3 files changed, 7 insertions(+) create mode 100644 tests/025_high_precision.test create mode 100644 tests/025_high_precision.ts create mode 100644 tests/025_high_precision.ts.out (limited to 'tests') diff --git a/tests/025_high_precision.test b/tests/025_high_precision.test new file mode 100644 index 000000000..2bc460c9b --- /dev/null +++ b/tests/025_high_precision.test @@ -0,0 +1,2 @@ +args: --allow-high-precision --reload tests/025_high_precision.ts +output: tests/025_high_precision.ts.out diff --git a/tests/025_high_precision.ts b/tests/025_high_precision.ts new file mode 100644 index 000000000..85b3c839b --- /dev/null +++ b/tests/025_high_precision.ts @@ -0,0 +1,3 @@ +console.log(performance.now() % 2 !== 0); +Deno.revokePermission("highPrecision"); +console.log(performance.now() % 2 === 0); diff --git a/tests/025_high_precision.ts.out b/tests/025_high_precision.ts.out new file mode 100644 index 000000000..bb101b641 --- /dev/null +++ b/tests/025_high_precision.ts.out @@ -0,0 +1,2 @@ +true +true -- cgit v1.2.3