You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: Add comprehensive tests for mongoFieldToParseSchemaField type validation and clear error message
- Add tests for valid field type conversions
- Add tests for invalid type handling (null, undefined, non-string values)
- Ensure Parse.Error code is thrown for invalid inputs
- Test coverage for the type validation improvements
- Add a clear error explanation
Copy file name to clipboardExpand all lines: src/Adapters/Storage/Mongo/MongoSchemaCollection.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ function mongoFieldToParseSchemaField(type) {
6
6
if(!type||typeoftype!=='string'){
7
7
thrownewParse.Error(
8
8
Parse.Error.INVALID_SCHEMA_OPERATION,
9
-
`Invalid field type: ${type}. Expected a string. Field type must be one of: string, number, boolean, date, map, object, array, geopoint, file, bytes, polygon, or a valid relation/pointer format.`
9
+
`Invalid field type: ${type}. Expected a string. Fix the type mismatch in your schema configuration.`
0 commit comments