Skip to content

Commit

Permalink
test(core): fix validator snapshot changes
Browse files Browse the repository at this point in the history
  • Loading branch information
reel committed Jul 15, 2019
1 parent c7588f8 commit 4b54d8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 362 deletions.
362 changes: 1 addition & 361 deletions packages/core/src/__tests__/__snapshots__/henri.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -93,366 +93,6 @@ Henri {
"syntax": [Function],
"yarnExists": [Function],
},
"validator": Object {
"blacklist": [Function],
"contains": [Function],
"default": [Circular],
"equals": [Function],
"escape": [Function],
"isAfter": [Function],
"isAlpha": [Function],
"isAlphaLocales": Array [
"en-US",
"bg-BG",
"cs-CZ",
"da-DK",
"de-DE",
"el-GR",
"es-ES",
"fr-FR",
"it-IT",
"nb-NO",
"nl-NL",
"nn-NO",
"hu-HU",
"pl-PL",
"pt-PT",
"ru-RU",
"sl-SI",
"sk-SK",
"sr-RS@latin",
"sr-RS",
"sv-SE",
"tr-TR",
"uk-UA",
"ku-IQ",
"ar",
"en-AU",
"en-GB",
"en-HK",
"en-IN",
"en-NZ",
"en-ZA",
"en-ZM",
"ar-AE",
"ar-BH",
"ar-DZ",
"ar-EG",
"ar-IQ",
"ar-JO",
"ar-KW",
"ar-LB",
"ar-LY",
"ar-MA",
"ar-QM",
"ar-QA",
"ar-SA",
"ar-SD",
"ar-SY",
"ar-TN",
"ar-YE",
"pt-BR",
"pl-Pl",
],
"isAlphanumeric": [Function],
"isAlphanumericLocales": Array [
"en-US",
"bg-BG",
"cs-CZ",
"da-DK",
"de-DE",
"el-GR",
"es-ES",
"fr-FR",
"it-IT",
"hu-HU",
"nb-NO",
"nl-NL",
"nn-NO",
"pl-PL",
"pt-PT",
"ru-RU",
"sl-SI",
"sk-SK",
"sr-RS@latin",
"sr-RS",
"sv-SE",
"tr-TR",
"uk-UA",
"ku-IQ",
"ar",
"en-AU",
"en-GB",
"en-HK",
"en-IN",
"en-NZ",
"en-ZA",
"en-ZM",
"ar-AE",
"ar-BH",
"ar-DZ",
"ar-EG",
"ar-IQ",
"ar-JO",
"ar-KW",
"ar-LB",
"ar-LY",
"ar-MA",
"ar-QM",
"ar-QA",
"ar-SA",
"ar-SD",
"ar-SY",
"ar-TN",
"ar-YE",
"pt-BR",
"pl-Pl",
],
"isAscii": [Function],
"isBase32": [Function],
"isBase64": [Function],
"isBefore": [Function],
"isBoolean": [Function],
"isByteLength": [Function],
"isCreditCard": [Function],
"isCurrency": [Function],
"isDataURI": [Function],
"isDecimal": [Function],
"isDivisibleBy": [Function],
"isEmail": [Function],
"isEmpty": [Function],
"isFQDN": [Function],
"isFloat": [Function],
"isFloatLocales": Array [
"en-US",
"ar",
"en-AU",
"en-GB",
"en-HK",
"en-IN",
"en-NZ",
"en-ZA",
"en-ZM",
"ar-AE",
"ar-BH",
"ar-DZ",
"ar-EG",
"ar-IQ",
"ar-JO",
"ar-KW",
"ar-LB",
"ar-LY",
"ar-MA",
"ar-QM",
"ar-QA",
"ar-SA",
"ar-SD",
"ar-SY",
"ar-TN",
"ar-YE",
"bg-BG",
"cs-CZ",
"da-DK",
"de-DE",
"el-GR",
"es-ES",
"fr-FR",
"it-IT",
"ku-IQ",
"hu-HU",
"nb-NO",
"nn-NO",
"nl-NL",
"pl-PL",
"pt-PT",
"ru-RU",
"sl-SI",
"sr-RS@latin",
"sr-RS",
"sv-SE",
"tr-TR",
"uk-UA",
"pt-BR",
"pl-Pl",
],
"isFullWidth": [Function],
"isHalfWidth": [Function],
"isHash": [Function],
"isHexColor": [Function],
"isHexadecimal": [Function],
"isIP": [Function],
"isIPRange": [Function],
"isISBN": [Function],
"isISIN": [Function],
"isISO31661Alpha2": [Function],
"isISO31661Alpha3": [Function],
"isISO8601": [Function],
"isISRC": [Function],
"isISSN": [Function],
"isIdentityCard": [Function],
"isIn": [Function],
"isInt": [Function],
"isJSON": [Function],
"isJWT": [Function],
"isLatLong": [Function],
"isLength": [Function],
"isLowercase": [Function],
"isMACAddress": [Function],
"isMD5": [Function],
"isMagnetURI": [Function],
"isMimeType": [Function],
"isMobilePhone": [Function],
"isMobilePhoneLocales": Array [
"ar-AE",
"ar-DZ",
"ar-EG",
"ar-IQ",
"ar-JO",
"ar-KW",
"ar-SA",
"ar-SY",
"ar-TN",
"be-BY",
"bg-BG",
"bn-BD",
"cs-CZ",
"da-DK",
"de-DE",
"el-GR",
"en-AU",
"en-GB",
"en-GH",
"en-HK",
"en-IE",
"en-IN",
"en-KE",
"en-MU",
"en-NG",
"en-NZ",
"en-PK",
"en-RW",
"en-SG",
"en-TZ",
"en-UG",
"en-US",
"en-ZA",
"en-ZM",
"es-ES",
"es-MX",
"es-PY",
"es-UY",
"et-EE",
"fa-IR",
"fi-FI",
"fo-FO",
"fr-FR",
"he-IL",
"hu-HU",
"id-ID",
"it-IT",
"ja-JP",
"kk-KZ",
"kl-GL",
"ko-KR",
"lt-LT",
"ms-MY",
"nb-NO",
"nl-BE",
"nn-NO",
"pl-PL",
"pt-BR",
"pt-PT",
"ro-RO",
"ru-RU",
"sl-SI",
"sk-SK",
"sr-RS",
"sv-SE",
"th-TH",
"tr-TR",
"uk-UA",
"vi-VN",
"zh-CN",
"zh-TW",
"en-CA",
"fr-BE",
"zh-HK",
],
"isMongoId": [Function],
"isMultibyte": [Function],
"isNumeric": [Function],
"isPort": [Function],
"isPostalCode": [Function],
"isPostalCodeLocales": Array [
"AD",
"AT",
"AU",
"BE",
"BG",
"CA",
"CH",
"CZ",
"DE",
"DK",
"DZ",
"EE",
"ES",
"FI",
"FR",
"GB",
"GR",
"HR",
"HU",
"ID",
"IL",
"IN",
"IS",
"IT",
"JP",
"KE",
"LI",
"LT",
"LU",
"LV",
"MX",
"NL",
"NO",
"PL",
"PT",
"RO",
"RU",
"SA",
"SE",
"SI",
"SK",
"TN",
"TW",
"UA",
"US",
"ZA",
"ZM",
],
"isRFC3339": [Function],
"isSurrogatePair": [Function],
"isURL": [Function],
"isUUID": [Function],
"isUppercase": [Function],
"isVariableWidth": [Function],
"isWhitelisted": [Function],
"ltrim": [Function],
"matches": [Function],
"normalizeEmail": [Function],
"rtrim": [Function],
"stripLow": [Function],
"toBoolean": [Function],
"toDate": [Function],
"toFloat": [Function],
"toInt": [Function],
"toString": [Function],
"trim": [Function],
"unescape": [Function],
"version": "11.0.0",
"whitelist": [Function],
},
"validator": Object {},
}
`;
5 changes: 4 additions & 1 deletion packages/core/src/__tests__/henri.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ const Henri = require('../henri');

describe('henri', () => {
describe('general', () => {
beforeAll(() => {
beforeEach(() => {
this.henri = new Henri({ runlevel: 1 });
});

it('should match snapshot', () => {
delete this.henri.validator;
this.henri.validator = {};

expect(this.henri).toMatchSnapshot();
});

Expand Down

0 comments on commit 4b54d8b

Please sign in to comment.