Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('appends values from a given metadata object', () => {
metadata.add('key1', 'value1');
metadata.add('Key2', 'value2a');
metadata.add('KEY3', 'value3a');
metadata.add('key4', 'value4');
const metadata2 = new TestMetadata();
metadata2.add('KEY1', 'value1');
metadata2.add('key2', 'value2b');
metadata2.add('key3', 'value3b');
metadata2.add('key5', 'value5a');
metadata2.add('key5', 'value5b');
const metadata2IR = metadata2.getInternalRepresentation();
metadata.merge(metadata2);
// Ensure metadata2 didn't change
assert.deepEqual(metadata2.getInternalRepresentation(), metadata2IR);
assert.deepEqual(metadata.get('key1'), ['value1', 'value1']);
assert.deepEqual(metadata.get('key2'), ['value2a', 'value2b']);
assert.deepEqual(metadata.get('key3'), ['value3a', 'value3b']);
assert.deepEqual(metadata.get('key4'), ['value4']);
assert.deepEqual(metadata.get('key5'), ['value5a', 'value5b']);
});
});
deflater.flush(function () {
var bufs = []
var buf
// eslint-disable-next-line
while (buf = deflater.read()) {}
bufs.push(buf)
actualFull = Buffer.concat(bufs)
assert.deepEqual(actualNone, expectedNone)
assert.deepEqual(actualFull, expectedFull)
done()
})
})
it('get & set attributes', function() {
var model = new Model();
model.set('enabled', true);
model.set('browserFiles', ['a.css', 'b.css']);
assert.equal(model.get('enabled'), true);
assert.deepEqual(model.get('browserFiles'), ['a.css', 'b.css']);
});
it('case 2', function () {
const encodeParametersResult22 = abi.decodeParameters([
{ 'type': 'function', 'name': 'singl', 'inputs': [{ 'name': 'param1', 'type': 'address' }] },
{
'type': 'function',
'name': 'singleParam',
'inputs': [
{ 'name': 'param1', 'type': 'address' },
{ 'name': 'param1', 'type': 'uint8[]' }
]
}
], '00000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002', 'singleParam');
assert.deepEqual([ 'vite_00010000000000000000000000000000000000005cce05dbde', [ 1, 2 ]], encodeParametersResult22);
});
it('case 3', function () {
default: function(){return this.username}
},
meta: {
createAt: {
default: function () { return 1 }
},
updateAt: {
default: function () { return 2 }
}
}
}
var data = instance.beforeAdd({username: 'welefen', meta: {
createAt: 3,
updateAt: 4
}});
assert.deepEqual(data, {"name":"welefen","username":"welefen","meta":{"createAt":3,"updateAt":4}});
})
it('beforeAdd, has depth 3', function(){
it('should give the same results', function () {
assert.deepEqual(bufferFile.getHeader(), streamFile.getHeader());
assert.deepEqual(bufferFile.getTracks(), streamFile.getTracks());
});
});
test('beginning split', () => {
assert.deepEqual(splitBy([false, 1, 2, 3], d => !d), [[], [1, 2, 3]])
})
test('ending split', () => {
test('初期値が正しく設定されること', function(){
assert.deepEqual(suanpai._paishu.m, [0,4,4,4,4,4,4,4,4,4]);
assert.deepEqual(suanpai._paishu.p, [0,4,4,4,4,4,4,4,4,4]);
assert.deepEqual(suanpai._paishu.s, [0,4,4,4,4,4,4,4,4,4]);
assert.deepEqual(suanpai._paishu.z, [0,4,4,4,4,4,4,4]);
assert.equal(suanpai._zhuangfeng, 0);
assert.equal(suanpai._menfeng, 0);
assert.deepEqual(suanpai._baopai, []);
assert.deepEqual(suanpai._dapai, [{},{},{},{}]);
assert.deepEqual(suanpai._lizhi, []);
});
test('赤牌の数を指定してインスタンスが生成できること', function(){
it('filters out completion results', function () {
var completed = [
'backbone',
'backbone-forms',
'backbone-paginator',
'backbone.forms',
'backbone.paginator'
];
var all = complete.abbrev({ word: 'ba' });
var none = complete.abbrev({ word: 'foobar' });
var form = complete.abbrev({ word: 'backbone-form' });
var dots = complete.abbrev({ word: 'backbone.' });
var dashed = complete.abbrev({ word: 'backbone-' });
assert.deepEqual(completed.filter(all), completed);
assert.deepEqual(completed.filter(none), []);
assert.deepEqual(completed.filter(form), ['backbone-forms']);
assert.deepEqual(completed.filter(dashed), ['backbone-forms', 'backbone-paginator']);
assert.deepEqual(completed.filter(dots), ['backbone.forms', 'backbone.paginator']);
});
const range = selection.merge({
anchorKey: first.key,
anchorOffset: 0,
focusKey: first.key,
focusOffset: 0
})
const next = state
.change()
.select(range)
.insertBlock('image')
.state
const updated = next.document.getTexts().first()
assert.deepEqual(
next.selection.toJS(),
range.collapseToStartOf(updated).toJS()
)
return next
}