summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVincent LE GOFF <g_n_s@hotmail.fr>2019-04-08 22:22:40 +0200
committerRyan Dahl <ry@tinyclouds.org>2019-04-08 16:22:40 -0400
commit734cf781c6e606a8a836863a391c94cf4fad22d7 (patch)
treed55d5212bdeedf4b9b1e53893478489ec960551a /tests
parentf7fdb90fd51e340ea598c055bb3573d3cdfbdaa8 (diff)
Allow high precision performance.now() (#1977)
Diffstat (limited to 'tests')
-rw-r--r--tests/025_high_precision.test2
-rw-r--r--tests/025_high_precision.ts3
-rw-r--r--tests/025_high_precision.ts.out2
3 files changed, 7 insertions, 0 deletions
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