fix mocha end judge