did you run the tests? this doesn't look like it would work, as `assert.equal(type, msg)` above should fail..