From 1227d989046d88e4728d26d71144c6f7cfc7491a Mon Sep 17 00:00:00 2001 From: Bradford Powell Date: Sat, 6 Aug 2022 16:04:22 -0400 Subject: [PATCH] add a non-probabilistic test for the ? operator This really just tests that the ? operator faithfully gets represented as degradeBy(0.5) --- packages/mini/test/mini.test.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/mini/test/mini.test.mjs b/packages/mini/test/mini.test.mjs index baf34314..08283fe8 100644 --- a/packages/mini/test/mini.test.mjs +++ b/packages/mini/test/mini.test.mjs @@ -50,4 +50,9 @@ describe('mini', () => { it('supports euclidean rhythms', () => { assert.deepStrictEqual(minS('a(3, 8)'), ['a: 0 - 1/8', 'a: 3/8 - 1/2', 'a: 3/4 - 7/8']); }); + it('supports the ? operator', () => { + assert.deepStrictEqual( + mini('a?').queryArc(0, 20).map(hap => hap.whole.begin), + mini('a').degradeBy(0.5).queryArc(0, 20).map(hap => hap.whole.begin)); + }); });