(validatorDetails, j, validator, type)
| 202 | }); |
| 203 | }, |
| 204 | applyPassTest = function applyPassTest(validatorDetails, j, validator, type) { |
| 205 | const succeedingValue = validatorDetails.pass[j]; |
| 206 | it(`correctly specifies an instance as valid using a value of class="st">"${succeedingValue}" for the validation class="st">"${validator}"`, async function() { |
| 207 | const validations = {}, |
| 208 | message = `${validator}(${succeedingValue})`; |
| 209 | |
| 210 | validations[validator] = validatorDetails.spec || {}; |
| 211 | |
| 212 | if (type === class="st">'msg') { |
| 213 | validations[validator].msg = message; |
| 214 | } else if (type === class="st">'args') { |
| 215 | validations[validator].args = validations[validator].args || true; |
| 216 | validations[validator].msg = message; |
| 217 | } else if (type === class="st">'true') { |
| 218 | validations[validator] = true; |
| 219 | } |
| 220 | |
| 221 | const UserSuccess = this.sequelize.define(`User${Support.rand()}`, { |
| 222 | name: { |
| 223 | type: Sequelize.STRING, |
| 224 | validate: validations |
| 225 | } |
| 226 | }); |
| 227 | const successfulUser = UserSuccess.build({ name: succeedingValue }); |
| 228 | await expect(successfulUser.validate()).not.to.be.rejected; |
| 229 | }); |
| 230 | }; |
| 231 | |
| 232 | for (let validator in checks) { |
| 233 | if (checks.hasOwnProperty(validator)) { |
no test coverage detected