mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-12 06:08:37 +00:00
23 lines
592 B
JavaScript
23 lines
592 B
JavaScript
|
|
import 'fraction.js';
|
|
|
|
import { strict as assert } from 'assert';
|
|
|
|
import {TimeSpan, Hap} from "../js/strudel.mjs";
|
|
|
|
describe('TimeSpan', function() {
|
|
describe('equal()', function() {
|
|
it('Should be equal to the same value', function() {
|
|
assert.equal((new TimeSpan(0,4)).equals(new TimeSpan(0,4)), true);
|
|
});
|
|
});
|
|
});
|
|
|
|
describe('Hap', function() {
|
|
describe('has_onset()', function() {
|
|
it('True if part includes onset from whole', function() {
|
|
assert.equal(new Hap(new TimeSpan(0,1), new TimeSpan(0,1), "thing").has_onset(), true);
|
|
});
|
|
});
|
|
});
|
|
|