test(alert): add test for close method