有谁知道如何在Jasmine中测试这个?
function gameWon() {
$('#final_message_cpu').html('You WON!!!')
$('.computer_selection').css('display', 'block');
$('#show_after_starting').remove();
$('#hide_after_starting').css('display', 'inline')
$('#hide_after_starting').click(function() {
location.reload();
})
}
我有没有办法测试是否已删除$('#show_after_starting')?
答案 0 :(得分:1)
是:
expect($('#show_after_starting').length).toBe(0);