Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
san.nextTick(() => {
let dts = wrap.getElementsByTagName('dt');
let dds = wrap.getElementsByTagName('dd');
expect(dts.length).toBe(2);
expect(dds.length).toBe(2);
expect(dds[0].title).toBe('errorrik@gmail.com');
expect(dds[1].title).toBe('errorrik@gmail.com');
myComponent2.data.push('person.emails', 'erik@erik.com');
san.nextTick(() => {
let dts = wrap.getElementsByTagName('dt');
let dds = wrap.getElementsByTagName('dd');
expect(dts.length).toBe(2);
expect(dds.length).toBe(3);
expect(dds[0].title).toBe('errorrik@gmail.com');
expect(dds[1].title).toBe('errorrik@gmail.com');
expect(dds[2].title).toBe('erik@erik.com');
myComponent1.dispose();
myComponent2.dispose();
document.body.removeChild(wrap);
done();
});
});
san.nextTick(() => {
let dts = wrap.getElementsByTagName('dt');
let dds = wrap.getElementsByTagName('dd');
expect(dts.length).toBe(2);
expect(dds.length).toBe(6);
expect(dds[0].title).toBe('erik168@163.com');
expect(dds[1].title).toBe('errorrik@gmail.com');
expect(dds[2].title).toBe('xxx@xxx.com');
expect(dds[3].title).toBe('erik168@163.com');
expect(dds[4].title).toBe('errorrik@gmail.com');
expect(dds[5].title).toBe('xxx@xxx.com');
myComponent2.data.push('emails', 'erik@erik.com');
san.nextTick(() => {
let dts = wrap.getElementsByTagName('dt');
let dds = wrap.getElementsByTagName('dd');
expect(dts.length).toBe(2);
expect(dds.length).toBe(7);
expect(dds[0].title).toBe('erik168@163.com');
expect(dds[1].title).toBe('errorrik@gmail.com');
expect(dds[2].title).toBe('xxx@xxx.com');
expect(dds[3].title).toBe('erik168@163.com');
expect(dds[4].title).toBe('errorrik@gmail.com');
expect(dds[5].title).toBe('xxx@xxx.com');
expect(dds[6].title).toBe('erik@erik.com');
myComponent1.dispose();
myComponent2.dispose();
document.body.removeChild(wrap);
rmTodo: function (index) {
var todos = this.data.get('todos');
service.rmTodo(todos[index].id);
var now = new Date();
this.data.removeAt('todos', index);
san.nextTick(function () {
alert('List item delete: ' + ((new Date) - now));
});
}
});
this.watch('treeData.treeData', value => {
san.nextTick(function () {
this.updateSelfCheckboxStateFromChilds();
}, this);
});
export function nextTick(fn, thisArg) {
return san.nextTick(fn, thisArg);
}
this.watch('treeData.treeData', value => {
san.nextTick(function () {
this.updateSelfCheckboxStateFromChilds();
}, this);
});