From fb149808ee372e54859d167b3d9c46c538965f82 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 23 Feb 2022 22:46:01 +0000 Subject: [PATCH] test div and mul --- test/pattern.test.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/pattern.test.mjs b/test/pattern.test.mjs index 70e49974..3d6a58dd 100644 --- a/test/pattern.test.mjs +++ b/test/pattern.test.mjs @@ -80,6 +80,16 @@ describe('Pattern', function() { assert.equal(pure(3).sub(pure(4)).query(new TimeSpan(Fraction(0), Fraction(1)))[0].value, -1) }) }) + describe('mul()', function () { + it('Can multiply things', function() { + assert.equal(pure(3).mul(pure(2)).firstCycle[0].value, 6) + }) + }) + describe('div()', function () { + it('Can divide things', function() { + assert.equal(pure(3).div(pure(2)).firstCycle[0].value, 1.5) + }) + }) describe('union()', function () { it('Can union things', function () { assert.deepStrictEqual(pure({a: 4, b: 6}).union(pure({c: 7})).firstCycle[0].value, {a: 4, b: 6, c: 7})