mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
test div and mul
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user