Javascript assertion framework