test: include edge case tests for `res.type()` (#7037)