We recently changed the behavior so that traits will always get passed in - but will be an empty object if there haven't been any traits recorded. I'm don't think this will break your tests, but you can get rid of the traits check.