jasmine-headless-webkit/spec/jasmine/console_log/console_log_spec.js
Leo Lännenmäki f57a59d767 console.log to clone jQuery objects before appending them.
If the appended element was a child of another element it was removed from that element.
This caused console.logging a child element to remove it from the parent.
2011-11-18 15:09:36 +02:00

15 lines
393 B
JavaScript

describe('console.log', function() {
it('should succeed, but with a console.log', function() {
console.log("hello");
expect(success).toEqual(1);
});
it("wont eat my precious jqueries", function() {
var d = $('<div><div id="inner">b</div></div>');
expect(d.find('#inner').length).toBe(1);
console.log(d.find('#inner'));
expect(d.find('#inner').length).toBe(1);
});
});