search for: waitforajax

Displaying 1 result from an estimated 1 matches for "waitforajax".

2005 Aug 02
1
JavaScript unit testing
...starting with ''test'' are considered, well, tests) testBlah: function() { with(this) { // do something ... assertEqual(expected, actual, "optional message"); // see unittest.js for more asserts // do more, assert more... waitForAjax(function() { // helper for ajax calls (because they''re asynchronous), waits for 1 second // asserts ... }); }} }, "id_of_test_log_container"); You''ll also need an empty div that you reference to, this empty div will be filled with a ta...