Mock path should be a string or object.
Don't add a mock when the path is an object.