summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-05-25 17:41:24 -0500
committersanine <sanine.not@pm.me>2022-05-25 17:41:24 -0500
commit5a87004c6e1ee2a0731269919c07ca211ebfd099 (patch)
treebb62b8739e5bd9433a3941f099a27378adfc98e1 /modules
parentc77ec9bc9c7eded445171b915ab59e591dbe9e3a (diff)
allow disabling benchmarks
Diffstat (limited to 'modules')
-rw-r--r--modules/Geometry.test.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/Geometry.test.js b/modules/Geometry.test.js
index bfac85f..925a53d 100644
--- a/modules/Geometry.test.js
+++ b/modules/Geometry.test.js
@@ -1,7 +1,8 @@
import { test, assert } from './test-assert.js';
-
import { AABB, QTNode, QuadTree } from './Geometry.js';
+const RUN_BENCHMARKS = false;
+
test('AABB correctly contains/excludes points', () => {
const box = new AABB(0, 0, 1, 1);
@@ -254,4 +255,5 @@ const closest_benchmark = () => {
tree.closest(pt);
}, iterations);
}
-closest_benchmark();
+if (RUN_BENCHMARKS)
+ closest_benchmark();