From 5a87004c6e1ee2a0731269919c07ca211ebfd099 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 25 May 2022 17:41:24 -0500 Subject: allow disabling benchmarks --- modules/Geometry.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/Geometry.test.js') 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(); -- cgit v1.2.1