Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var aXorBCtor = xorStreamCtor(streamACtor, streamBCtor)
test('compare longer file to shorter file', function (t) {
// this fails right now
t.plan(2)
var xorB = xorStream(aXorBCtor(), streamBCtor())
streamEqual(streamACtor(), xorB, function (err, equal) {
t.error(err, 'streams compared without error')
t.ok(equal, 'equal pairity output')
})
})
test.skip('compare shorter file to longer file', function (t) {
t.plan(2)
var xorA = xorStream(aXorBCtor(), streamACtor())
streamEqual(streamBCtor(), xorA, function (err, equal) {
t.error(err, 'streams compared without error')
t.ok(equal, 'equal pairity output')
})
})
test('compare stings', function (t) {
t.plan(2)
var strA = crypto.randomBytes(1000).toString('hex')
var strB = crypto.randomBytes(1000).toString('hex')
}
};
var webjack = require('../dist/webjack');
function read (file) {
return fs.readFileSync('./test/fixtures/' + file, 'utf8').trim();
}
function write (file, data) { /* jshint ignore:line */
return fs.writeFileSync('./test/fixtures/' + file, data + '\n', 'utf8');
}
test.skip('webjack has tests', function (t) {
// read('something.html')
t.equal(true, true);
t.end();
});
test('webjack module is exported', function (t) {
var conn = new webjack.Connection({audioCtx: AudioContext, navigator : navigator});
t.equal(typeof conn === 'object', true);
t.end();
});
a.write([0, .25, .5, .75, 1])
a.shift(-a.time(2), {rotate: true})
t.deepEqual(a.read({channel: 0}), [.5, .75, 1, 0, .25])
a.shift(a.time(3), {rotate: true})
t.deepEqual(a.read({channel: 0}), [1, 0, 0.25, .5, .75])
t.end()
})
t.skip('shift channels')
t.skip('stream', t => {
// let a = Audio(MediaInput, a => {
// })
t.end()
})
t.skip('sync sequence', t => {
t.end()
})
t.skip('mixed sequence', t => {
t.end()
})
t('normalize', t => {
// labeled_talk_without_milestone.json
// live tested
});
test.skip('issue: labeled "talk" - creates a new event file at first run with valid data', function(t) {
// labeled_talk_with_milestone.json
// live tested
});
test.skip('issue: labeled "talk" - udates talk information in an event', function(t) {
// comment_created.json
// each comment from the issue owner should trigger an update on the talk
// a comment from the repo owner should also trigger an update, just in case
});
test.skip('issue: labeled "talk" - verify important data isn\'t overwritten with an update', function(t) {
// labeled_talk_with_milestone.json
// check that talk.speaker, created_at etc. are the same as before and everything else is updated
});
test.skip('issue: unlabeled "talk" should remove a talk from the event', function(t) {
// unlabeled_talk_with_milestone.json
//TODO: not implemented yet
});
const result = aggregationBuilder().aggregation('percentiles', 'load_time', {
percents: [95, 99, 99.9]
})
t.deepEqual(result.getAggregations(), {
agg_percentiles_load_time: {
percentiles: {
field: 'load_time',
percents: [95, 99, 99.9]
}
}
})
})
// Skipping, first need a way to handle aggregations with no `field`
test.skip('aggregationBuilder | percentiles script aggregation', (t) => {
t.plan(1)
const result = aggregationBuilder().aggregation('percentiles', 'load_time', {
script: {
inline: "doc['load_time'].value / timeUnit",
params: {
timeUnit: 100
}
}
})
t.deepEqual(result.getAggregations(), {
agg_percentiles_load_time: {
percentiles: {
script: {
inline: "doc['load_time'].value / timeUnit",
t.skip('audio.serialize', t => {
})
t.skip('toArray default', t => {
let a = Audio(.5)
let arr = a.toArray()
t.ok(Array.isArray(arr))
t.equal(arr.length, 22050)
t.equal(arr[0], 0)
t.end()
})
t.skip('toArray uint8 interleaved', t => {
let a = Audio(.5, 2)
let arr = a.toArray('uint8 interleaved')
t.ok(ArrayBuffer.isView(arr))
t.equal(arr.length, 22050*2)
t.equal(arr[0], 127)
t.end()
})
var d = {};
d[symbolIterator] = genericIterator(obj);
it.equal(isEqual(c, d), false, 'iterable c / iterable d are not equal');
it.equal(isEqual(d, c), false, 'iterable d / iterable c are not equal');
it.end();
});
t.end();
});
var Circular = function Circular() {
this.circularRef = this;
};
test.skip('circular references', function (t) {
var a = new Circular();
var b = new Circular();
t.equal(isEqual(a, b), true, 'two circular referencing instances are equal');
var c = {};
var d = {};
c.c = c;
d.d = d;
t.equal(isEqual(c, d), false, 'two objects with different circular references are not equal');
t.end();
});
let a2 = Audio({length: 1000})
let a3 = Audio({length: 1001})
let a4 = Audio({length: 1000}).write(1)
let a5 = Audio.from(Audio({length: 500}).write(1), Audio({length: 500}).write(1))
t.ok(Audio.equal(a1, a2))
t.notOk(Audio.equal(a2, a3))
t.notOk(Audio.equal(a2, a4))
t.ok(Audio.equal(a4, a5))
t.ok(Audio.equal(a1, Audio({length: 1000}), a2))
t.notOk(Audio.equal(a1, Audio({length: 1000}), a3))
t.end()
})
t.skip('audio.serialize', t => {
})
t.skip('toArray default', t => {
let a = Audio(.5)
let arr = a.toArray()
t.ok(Array.isArray(arr))
t.equal(arr.length, 22050)
t.equal(arr[0], 0)
t.end()
})
t.skip('toArray uint8 interleaved', t => {
let a = Audio(.5, 2)
var b = protocol({timeout: 100})
var timeout = setTimeout(function () {
t.fail('should time out')
}, 1000)
b.on('error', function () {
clearTimeout(timeout)
t.pass('timed out')
t.end()
})
a.pipe(b).pipe(a)
})
tape.skip('expected feeds', function (t) {
var a = protocol({expectedFeeds: 1})
a.resume()
a.on('end', function () {
t.pass('should end')
t.end()
})
var ch = a.feed(KEY)
ch.close()
})
tape.skip('2 expected feeds', function (t) {
var a = protocol({expectedFeeds: 2})
var created = 0
batch.push(extend({}, options, {color: colors, opacity: 1, join: 'round', overlay: true, positions: positions, miterlimit: 1, thickness: 30, dash: null}))
t.end()
})
t.skip('rect line', t => {
t.end()
})
t.skip('painting', t => {
pan = false
t.end()
})
t.skip('fix horizontal segments', t => {
let positions = {
x: [ 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2,2.1,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3,3.1,3.2,3.3,3.4,3.5,3.6,3.7,3.8,3.9,4,4.1,4.2,4.3,4.4,4.5,4.6,4.7,4.8,4.9,5,5.1,5.2,5.3,5.4,5.5,5.6,5.7,5.8,5.9,6,6.1,6.2,6.3,6.4,6.5,6.6,6.7,6.8,6.9,7,7.1,7.2,7.3,7.4,7.5,7.6,7.7,7.8,7.9,8,8.1,8.2,8.3,8.4,8.5,8.6,8.7,8.8,8.9,9,9.1,9.2,9.3,9.4,9.5,9.6,9.7,9.8,9.9,10],
y: [ 20.392,20.388,20.386,20.374,20.384,20.384,20.384,20.38,20.384,20.384,20.384,20.372,20.388,20.384,20.386,20.376,20.38,20.384,20.38,20.386,20.382,20.378,20.372,20.378,20.386,20.384,20.386,20.394,20.388,20.38,20.384,20.384,20.374,20.36,20.378,20.384,20.378,20.378,20.384,20.38,20.384,20.386,20.378,20.384,20.386,20.384,20.384,20.384,20.386,20.384,20.38,20.374,20.384,20.384,20.384,20.384,20.384,20.384,20.378,20.384,20.384,20.38,20.372,20.384,20.374,20.38,20.384,20.378,20.394,20.384,20.384,20.384,20.376,20.38,20.378,20.378,20.384,20.372,20.384,20.378,20.384,20.384,20.378,20.378,20.384,20.38,20.376,20.38,20.38,20.384,20.384,20.378,20.38,20.384,20.38,20.394,20.384,20.384,20.378,20.372]
}
line2d.update({color: 'gray', positions, join: 'round', thickness: 10})
line2d.draw()
batch.push(extend({}, options, {
positions,
type: 'round',
thickness: 10,
color: 'gray'
}))
t.end()