24 lines
665 B
JavaScript
24 lines
665 B
JavaScript
(function(context, $) {
|
|
|
|
context.JKTestUtils = {
|
|
loadFixtures: function(path) {
|
|
$('body').append('<div id="test-fixtures"></div>');
|
|
$.ajax({
|
|
url:path,
|
|
async: false,
|
|
success: function(r) {
|
|
$('#test-fixtures').html(r);
|
|
},
|
|
error: function(jqXHR, textStatus, errorThrown) {
|
|
// Assumes we're in a jasmine context
|
|
fail(errorThrown);
|
|
}
|
|
});
|
|
},
|
|
|
|
removeFixtures: function() {
|
|
$('#test-fixtures').remove();
|
|
}
|
|
};
|
|
|
|
})(window, jQuery); |