');
expect(root.append('text')).toEqual(root);
expect(root.html()).toEqual('text');
});
});
describe('remove', function(){
it('should remove', function(){
var root = jqLite('
abc
');
var span = root.find('span');
expect(span.remove()).toEqual(span);
expect(root.html()).toEqual('');
});
});
describe('after', function(){
it('should after', function(){
var root = jqLite('
');
var span = root.find('span');
expect(span.after('
')).toEqual(span);
expect(root.html().toLowerCase()).toEqual('
');
});
it('should allow taking text', function(){
var root = jqLite('
');
var span = root.find('span');
span.after('abc');
expect(root.html().toLowerCase()).toEqual('
abc');
});
});
describe('parent', function(){
it('should return empty set when no parent', function(){
var element = jqLite('
abc
');
expect(element.parent()).toBeTruthy();
expect(element.parent().length).toEqual(0);
});
});
describe('find', function(){
it('should find child by name', function(){
var root = jqLite('
');
var innerDiv = root.find('div');
expect(innerDiv.length).toEqual(1);
expect(innerDiv.html()).toEqual('text');
});
});
});