@xapp/dynamo-service
Advanced tools
Comparing version 1.0.0-alpha.7 to 1.0.0-alpha.8
@@ -91,2 +91,28 @@ "use strict"; | ||
}); | ||
it("Returns no error if the attributes are undefined.", () => { | ||
const schema = mapSchemaBuilder("TestItem", { | ||
attributes: { | ||
"TestString": { | ||
type: "S" | ||
} | ||
} | ||
}); | ||
const errors = schema.validateObjectAgainstSchema({ | ||
"TestItem": undefined | ||
}); | ||
ValidatorTestUtils_1.expectToHaveNoErrors(errors); | ||
}); | ||
it("Returns no errors if the map is empty with optional parameters.", () => { | ||
const schema = mapSchemaBuilder("TestItem", { | ||
attributes: { | ||
"TestString": { | ||
type: "S" | ||
} | ||
} | ||
}); | ||
const errors = schema.validateObjectAgainstSchema({ | ||
"TestItem": {} | ||
}); | ||
ValidatorTestUtils_1.expectToHaveNoErrors(errors); | ||
}); | ||
}, | ||
@@ -322,4 +348,19 @@ updateValidationTests: () => { | ||
}); | ||
it("Returns no error if setting the map attribute to undefined.", () => { | ||
const schema = mapSchemaBuilder("TestItem", { | ||
attributes: { | ||
"TestString": { | ||
type: "S" | ||
} | ||
} | ||
}); | ||
const errors = schema.validateUpdateObjectAgainstSchema({ | ||
set: { | ||
"TestItem": undefined | ||
} | ||
}); | ||
ValidatorTestUtils_1.expectToHaveNoErrors(errors); | ||
}); | ||
} | ||
}); | ||
}); |
@@ -30,3 +30,3 @@ "use strict"; | ||
let builder = SchemaBuilder_1.getSchemaBuilder(attributeKey, attributeSchema); | ||
const foundErrors = builder.validateObjectAgainstSchema(obj); | ||
const foundErrors = (obj) ? builder.validateObjectAgainstSchema(obj) : undefined; | ||
errors.push(...(foundErrors || [])); | ||
@@ -33,0 +33,0 @@ } |
{ | ||
"name": "@xapp/dynamo-service", | ||
"version": "1.0.0-alpha.7", | ||
"version": "1.0.0-alpha.8", | ||
"description": "A dynamo help class which will help maintain data integrity.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
529600
110
5226
4