Testing for check mate is currently implemented using only fool's mate as an example, and should be properly tested to find lurking bugs. This could be done by taking move history from some public games that end with mate and ensuring that all are moves valid and that game is finished when there are no more moves to be played.