'has recorded pitch sequence': function(score) { assert.deepEqual(score.pitches, [40, 40, 40]); },
Lazy.range(10, -8).join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(10, -8)); assert.equal(xs.length, 18); });
it('returns empty array if no properties requested', function() { assert.deepEqual(R.props([], obj), []); });
Lazy.range('(10..1)').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(9,1)); assert.equal(xs.length, 8); });
Lazy.range('(10..').take(10).join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(11, 21)); assert.equal(xs.length, 10); });
Lazy.range('1,1.1..4').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(1,4,0.1)); assert.equal(xs.length, 30); });
Lazy.range('[1..10)').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(1,10)); assert.equal(xs.length, 9); });
it('should ignore block comments in line comments', function(){ var comments = getCommentsFrom('lineIgnoreBlock.test.scss'); assert.equal(comments.length, 1); assert.deepEqual(comments[0].lines, ['', '/** test*/', '']); });
it('should normalize the indentation', function(){ var comments = getCommentsFrom('lineIndentation.test.scss'); assert.deepEqual(comments[0].lines, ['', 'test', ' hello', ' world', '']); });
it('should not split every "*"', function(){ var comments = getCommentsFrom('blockSplitCorrect.test.scss'); assert.deepEqual(comments[0].lines, [ '@param {*} $list - list to purge', 'Test', 'Test']); });
parse : function(line, info, id){ assert.equal(id, 'FileID'); assert.deepEqual(info, {"description":"","commentRange":{"start":1,"end":3},"context":{"type":"demo"}}); done(); },
it('should ignore annotations that won\'t return anything', function(){ var result = parser.parse ( comments ); assert.deepEqual(result[2].ignore , []); });
it('should extract comments', function (){ var comments = getCommentsFrom('singleLineBlock.test.scss'); assert.equal(comments.length, 1); assert.deepEqual(comments[0].lines, ['block comment on a single line']); assert.deepEqual(comments[0].commentRange, { start: 1, end: 1 }); });
it('should preserve subsequent line comments on the same line', function(){ var comments = getCommentsFrom('linePreserveNested.test.scss'); assert.deepEqual(comments[0].lines, ['Preserves /// nested', '/// comments', '//// all /// over', 'the ////// place']); });
Lazy.range('5..50').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(5, 50)); assert.equal(xs.length, 45); });
it('should extract line commments with leading spaces', function(){ var comments = getCommentsFrom('lineIndentionBefore.test.scss'); assert.deepEqual(comments[0].lines, [ 'Just a test', ' ' ]); assert.deepEqual(comments[0].type, 'poster'); });
Lazy.range('50..44').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(50, 44)); assert.equal(xs.length, 6); });
it('should calculate KST using the calculate method', function() { assert.deepEqual(KST.calculate(input), expectResult, 'Wrong Results'); });
Lazy.range('4,3.9..1').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(4,1,0.1)); assert.equal(xs.length, 30); });
it('should be able to calculate KST by using getResult', function() { let roc = new KST(input); assert.deepEqual(roc.getResult(), expectResult, 'Wrong Results while calculating next bar'); });
Lazy.range('(1..10]').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(2,11)); assert.equal(xs.length, 9); });
it('should be able to calculate KST for reversed input by using calculate method', function() { let myInput = Object.assign({}, input); myInput.reversedInput = true; myInput.values.reverse(); assert.deepEqual(KST.calculate(myInput), expectResult.slice().reverse(), 'Wrong Results while calculating next bar'); });
Lazy.range('[5,10..50]').join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(5,51,5)); assert.equal(xs.length, 10); });
it('should subtract bignumbers', function() { assert.deepEqual(subtract(bignumber(0.3), bignumber(0.2)), bignumber(0.1)); assert.deepEqual(subtract(bignumber('2.3e5001'), bignumber('3e5000')), bignumber('2e5001')); assert.deepEqual(subtract(bignumber('1e19'), bignumber('1')), bignumber('9999999999999999999')); });
Lazy.range(-10, 10, 2).join(function (xs) { joinExecuted = true; assert.deepEqual(xs, range(-10, 10, 2)); assert.equal(xs.length, 10); });
it('should subtract mixed booleans and bignumbers', function() { assert.deepEqual(subtract(bignumber(1.1), true), bignumber(0.1)); assert.deepEqual(subtract(false, bignumber(0.2)), bignumber(-0.2)); });
it('slighty more complex graph', function() { /* ┌───────────────┐ │#1 TotalTime: 5│ └───────────────┘ │ ╔═══════════╩──────────┐ ║ │ ▼ ▼ ┌───────────────┐ ┌───────────────┐ │#2 TotalTime: 4│ │#3 TotalTime: 3│ └───────────────┘ └───────────────┘ ║ │ ║ │ ▼ ▼ ┌───────────────┐ ┌───────────────┐ │#4 TotalTime: 2│ │#5 TotalTime: 2│ └───────────────┘ └───────────────┘ ║ │ ║ │ ▼ ▼ ┌───────────────┐ ┌────────────────┐ │#6 TotalTime: 2│ │#7 TotalTime: 1 │ └───────────────┘ └────────────────┘ */ var g = buildGraph([{ _id: 1, stats: { time: { self: 0, }, }, children: [3, 2] }, { _id: 2, stats: { time: { self: 2, }, }, children: [4] }, { _id: 3, stats: { time: { self: 1, }, }, children: [5] }, { _id: 4, stats: { time: { self: 0, }, }, children: [6] }, { _id: 5, stats: { time: { self: 1, }, }, children: [7] }, { _id: 6, stats: { time: { self: 2, }, }, children: [] }, { _id: 7, stats: { time: { self: 1, }, }, children: [] }]); var ranked = rank(g).nodes; assert.deepEqual(ranked.map(byLevel), [0, 0, 1, 0, 1, 0, 1]); });
process.on('exit', function() { assert.deepEqual(events, ['connectCb', 'data', 'close']); });
it('returns values for requested properties', function() { assert.deepEqual(R.props(['a', 'e'], obj), [1, 5]); });
'has recorded song': function(score) { assert.deepEqual(score.recording, oneNote); },