@orion-js/schema
Advanced tools
Comparing version 0.7.4 to 0.7.26
@@ -230,2 +230,37 @@ 'use strict'; | ||
}, _callee6, undefined); | ||
}))); | ||
test('should handle $ correctly', _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() { | ||
var Email, user, cleaned; | ||
return regeneratorRuntime.wrap(function _callee7$(_context7) { | ||
while (1) { | ||
switch (_context7.prev = _context7.next) { | ||
case 0: | ||
Email = { | ||
address: { | ||
type: String | ||
}, | ||
verified: { | ||
type: Boolean | ||
} | ||
}; | ||
user = { | ||
emails: { | ||
type: [Email] | ||
} | ||
}; | ||
_context7.next = 4; | ||
return (0, _cleanKey2.default)(user, 'emails.$.verified', 'true'); | ||
case 4: | ||
cleaned = _context7.sent; | ||
expect(cleaned).toEqual(true); | ||
case 6: | ||
case 'end': | ||
return _context7.stop(); | ||
} | ||
} | ||
}, _callee7, undefined); | ||
}))); |
@@ -178,2 +178,37 @@ 'use strict'; | ||
}, _callee4, undefined); | ||
}))); | ||
test('should handle $ correctly', _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() { | ||
var Email, user; | ||
return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
switch (_context5.prev = _context5.next) { | ||
case 0: | ||
Email = { | ||
address: { | ||
type: String | ||
}, | ||
verified: { | ||
type: Boolean | ||
} | ||
}; | ||
user = { | ||
emails: { | ||
type: [Email] | ||
} | ||
}; | ||
_context5.t0 = expect; | ||
_context5.next = 5; | ||
return (0, _validateKey2.default)(user, 'emails.$.verified', true); | ||
case 5: | ||
_context5.t1 = _context5.sent; | ||
(0, _context5.t0)(_context5.t1).toBeNull(); | ||
case 7: | ||
case 'end': | ||
return _context5.stop(); | ||
} | ||
} | ||
}, _callee5, undefined); | ||
}))); |
{ | ||
"name": "@orion-js/schema", | ||
"version": "0.7.4", | ||
"version": "0.7.26", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "author": "nicolaslopezj", |
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
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
186451
4765