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