@bgord/tools 1.3.23 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/age-years.vo.d.ts +11 -0
- package/dist/src/age-years.vo.js +6 -0
- package/dist/{age.vo.js → src/age.vo.js} +2 -1
- package/dist/src/api-key.vo.d.ts +7 -0
- package/dist/src/api-key.vo.js +7 -0
- package/dist/src/basename.vo.d.ts +12 -0
- package/dist/src/basename.vo.js +22 -0
- package/dist/src/day-iso-id.vo.d.ts +9 -0
- package/dist/{day-iso-id.vo.js → src/day-iso-id.vo.js} +4 -8
- package/dist/{day.vo.js → src/day.vo.js} +7 -6
- package/dist/src/directory-path-absolute.vo.d.ts +12 -0
- package/dist/{directory-path-absolute.vo.js → src/directory-path-absolute.vo.js} +5 -12
- package/dist/src/directory-path-relative.vo.d.ts +12 -0
- package/dist/{directory-path-relative.vo.js → src/directory-path-relative.vo.js} +5 -12
- package/dist/src/distance-value.vo.d.ts +7 -0
- package/dist/src/distance-value.vo.js +5 -0
- package/dist/{distance.vo.js → src/distance.vo.js} +7 -6
- package/dist/src/division-factor.vo.d.ts +7 -0
- package/dist/src/division-factor.vo.js +5 -0
- package/dist/src/duration-ms.vo.d.ts +6 -0
- package/dist/src/duration-ms.vo.js +5 -0
- package/dist/{duration.service.js → src/duration.service.js} +2 -1
- package/dist/src/email.vo.d.ts +6 -0
- package/dist/src/email.vo.js +4 -0
- package/dist/{etags.vo.js → src/etags.vo.js} +3 -2
- package/dist/src/extension.vo.d.ts +9 -0
- package/dist/src/extension.vo.js +15 -0
- package/dist/src/feature-flag-value.vo.d.ts +10 -0
- package/dist/{feature-flag-value.vo.js → src/feature-flag-value.vo.js} +2 -2
- package/dist/src/file-path-absolute-schema.vo.d.ts +17 -0
- package/dist/{file-path-absolute-schema.vo.js → src/file-path-absolute-schema.vo.js} +6 -13
- package/dist/src/file-path-relative-schema.vo.d.ts +17 -0
- package/dist/{file-path-relative-schema.vo.js → src/file-path-relative-schema.vo.js} +6 -13
- package/dist/{file-path.vo.js → src/file-path.vo.js} +5 -4
- package/dist/src/filename-affix.vo.d.ts +13 -0
- package/dist/{filename-affix.vo.js → src/filename-affix.vo.js} +4 -9
- package/dist/src/filename-from-string.vo.d.ts +10 -0
- package/dist/{filename-from-string.vo.js → src/filename-from-string.vo.js} +5 -8
- package/dist/{filename.vo.js → src/filename.vo.js} +8 -7
- package/dist/src/height-milimiters.vo.d.ts +7 -0
- package/dist/src/height-milimiters.vo.js +8 -0
- package/dist/{height.vo.js → src/height.vo.js} +4 -3
- package/dist/src/hour-value.vo.d.ts +7 -0
- package/dist/src/hour-value.vo.js +5 -0
- package/dist/{hour.vo.js → src/hour.vo.js} +3 -2
- package/dist/src/iban-schema.vo.d.ts +7 -0
- package/dist/src/iban-schema.vo.js +7 -0
- package/dist/{iban.vo.js → src/iban.vo.js} +2 -1
- package/dist/src/image.vo.d.ts +13 -0
- package/dist/src/image.vo.js +10 -0
- package/dist/src/integer-non-negative.vo.d.ts +7 -0
- package/dist/src/integer-non-negative.vo.js +8 -0
- package/dist/src/integer-positive.vo.d.ts +7 -0
- package/dist/src/integer-positive.vo.js +5 -0
- package/dist/src/integer.vo.d.ts +6 -0
- package/dist/src/integer.vo.js +4 -0
- package/dist/src/language.vo.d.ts +7 -0
- package/dist/src/language.vo.js +5 -0
- package/dist/src/mime-value.vo.d.ts +7 -0
- package/dist/{mime-value.vo.js → src/mime-value.vo.js} +4 -7
- package/dist/{mime.vo.js → src/mime.vo.js} +2 -1
- package/dist/src/mimes.js +19 -0
- package/dist/src/minute-value.vo.d.ts +7 -0
- package/dist/src/minute-value.vo.js +5 -0
- package/dist/{minute.vo.js → src/minute.vo.js} +3 -2
- package/dist/src/money-amount.vo.d.ts +7 -0
- package/dist/src/money-amount.vo.js +5 -0
- package/dist/{money.vo.js → src/money.vo.js} +7 -6
- package/dist/src/month-iso-id.vo.d.ts +8 -0
- package/dist/{month-iso-id.vo.js → src/month-iso-id.vo.js} +5 -9
- package/dist/{month.vo.js → src/month.vo.js} +5 -4
- package/dist/src/multiplication-factor.vo.d.ts +7 -0
- package/dist/src/multiplication-factor.vo.js +8 -0
- package/dist/src/object-key.vo.d.ts +11 -0
- package/dist/src/object-key.vo.js +19 -0
- package/dist/src/package-version-schema.vo.d.ts +8 -0
- package/dist/{package-version-schema.vo.js → src/package-version-schema.vo.js} +4 -7
- package/dist/{package-version.vo.js → src/package-version.vo.js} +3 -4
- package/dist/src/pagination-page.vo.d.ts +6 -0
- package/dist/src/pagination-page.vo.js +3 -0
- package/dist/src/pagination-skip.vo.d.ts +7 -0
- package/dist/src/pagination-skip.vo.js +3 -0
- package/dist/src/pagination-take.vo.d.ts +7 -0
- package/dist/src/pagination-take.vo.js +3 -0
- package/dist/{pagination.service.js → src/pagination.service.js} +8 -7
- package/dist/src/quarter-iso-id.vo.d.ts +8 -0
- package/dist/src/quarter-iso-id.vo.js +7 -0
- package/dist/{quarter.vo.js → src/quarter.vo.js} +3 -2
- package/dist/src/reordering-item-position-value.vo.d.ts +6 -0
- package/dist/src/reordering-item-position-value.vo.js +3 -0
- package/dist/{reordering.service.d.ts → src/reordering.service.d.ts} +9 -9
- package/dist/{reordering.service.js → src/reordering.service.js} +7 -7
- package/dist/src/revision-value.vo.d.ts +7 -0
- package/dist/src/revision-value.vo.js +3 -0
- package/dist/{revision.vo.js → src/revision.vo.js} +3 -2
- package/dist/{rounding-decimal.strategy.d.ts → src/rounding-decimal.strategy.d.ts} +2 -2
- package/dist/src/rounding-decimal.strategy.js +14 -0
- package/dist/src/size-bytes.vo.d.ts +6 -0
- package/dist/src/size-bytes.vo.js +5 -0
- package/dist/{size.vo.js → src/size.vo.js} +5 -4
- package/dist/src/time-zone-offset-value.vo.d.ts +8 -0
- package/dist/src/time-zone-offset-value.vo.js +13 -0
- package/dist/src/timestamp-value.vo.d.ts +6 -0
- package/dist/src/timestamp-value.vo.js +5 -0
- package/dist/{timestamp.vo.js → src/timestamp.vo.js} +2 -1
- package/dist/src/timezone.vo.d.ts +9 -0
- package/dist/{timezone.vo.js → src/timezone.vo.js} +7 -10
- package/dist/src/url-with-slash.vo.d.ts +6 -0
- package/dist/src/url-with-slash.vo.js +5 -0
- package/dist/src/url-without-slash.vo.d.ts +6 -0
- package/dist/src/url-without-slash.vo.js +5 -0
- package/dist/src/week-iso-id.vo.d.ts +8 -0
- package/dist/{week-iso-id.vo.js → src/week-iso-id.vo.js} +5 -9
- package/dist/{week.vo.js → src/week.vo.js} +5 -4
- package/dist/src/weekday-iso-id.vo.d.ts +7 -0
- package/dist/src/weekday-iso-id.vo.js +5 -0
- package/dist/{weekday.vo.js → src/weekday.vo.js} +9 -8
- package/dist/src/weight-grams.vo.d.ts +7 -0
- package/dist/src/weight-grams.vo.js +5 -0
- package/dist/{weight.vo.js → src/weight.vo.js} +8 -7
- package/dist/src/year-iso-id.vo.d.ts +7 -0
- package/dist/src/year-iso-id.vo.js +7 -0
- package/dist/{year.vo.js → src/year.vo.js} +6 -5
- package/dist/tests/age-years.vo.test.d.ts +1 -0
- package/dist/tests/age-years.vo.test.js +24 -0
- package/dist/tests/age.vo.test.d.ts +1 -0
- package/dist/tests/age.vo.test.js +106 -0
- package/dist/tests/api-key.vo.test.d.ts +1 -0
- package/dist/tests/api-key.vo.test.js +24 -0
- package/dist/tests/basename.vo.test.d.ts +1 -0
- package/dist/tests/basename.vo.test.js +53 -0
- package/dist/tests/batch.test.d.ts +1 -0
- package/dist/tests/batch.test.js +24 -0
- package/dist/tests/date-calculator.service.test.d.ts +1 -0
- package/dist/tests/date-calculator.service.test.js +32 -0
- package/dist/tests/date-formatter.service.test.d.ts +1 -0
- package/dist/tests/date-formatter.service.test.js +22 -0
- package/dist/tests/date-range.vo.test.d.ts +1 -0
- package/dist/tests/date-range.vo.test.js +49 -0
- package/dist/tests/day-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/day-iso-id.vo.test.js +36 -0
- package/dist/tests/day.vo.test.d.ts +1 -0
- package/dist/tests/day.vo.test.js +68 -0
- package/dist/tests/directory-path-absolute.vo.test.d.ts +1 -0
- package/dist/tests/directory-path-absolute.vo.test.js +47 -0
- package/dist/tests/directory-path-relative.vo.test.d.ts +1 -0
- package/dist/tests/directory-path-relative.vo.test.js +44 -0
- package/dist/tests/distance-value.vo.test.d.ts +1 -0
- package/dist/tests/distance-value.vo.test.js +21 -0
- package/dist/tests/distance.vo.test.d.ts +1 -0
- package/dist/tests/distance.vo.test.js +74 -0
- package/dist/tests/division-factor.vo.test.d.ts +1 -0
- package/dist/tests/division-factor.vo.test.js +21 -0
- package/dist/tests/dll.service.test.d.ts +1 -0
- package/dist/tests/dll.service.test.js +381 -0
- package/dist/tests/duration-ms.vo.test.d.ts +1 -0
- package/dist/tests/duration-ms.vo.test.js +18 -0
- package/dist/tests/duration.service.test.d.ts +1 -0
- package/dist/tests/duration.service.test.js +126 -0
- package/dist/tests/email-mask.service.test.d.ts +1 -0
- package/dist/tests/email-mask.service.test.js +15 -0
- package/dist/tests/email.vo.test.d.ts +1 -0
- package/dist/tests/email.vo.test.js +17 -0
- package/dist/tests/etags.vo.test.d.ts +1 -0
- package/dist/tests/etags.vo.test.js +54 -0
- package/dist/tests/extension.vo.test.d.ts +1 -0
- package/dist/tests/extension.vo.test.js +51 -0
- package/dist/tests/feature-flag-value.vo.test.d.ts +1 -0
- package/dist/tests/feature-flag-value.vo.test.js +12 -0
- package/dist/tests/feature-flag.vo.test.d.ts +1 -0
- package/dist/tests/feature-flag.vo.test.js +13 -0
- package/dist/tests/file-path-absolute-schema.vo.test.d.ts +1 -0
- package/dist/tests/file-path-absolute-schema.vo.test.js +53 -0
- package/dist/tests/file-path-relative-schema.vo.test.d.ts +1 -0
- package/dist/tests/file-path-relative-schema.vo.test.js +52 -0
- package/dist/tests/file-path.vo.test.d.ts +1 -0
- package/dist/tests/file-path.vo.test.js +74 -0
- package/dist/tests/filename-affix.vo.test.d.ts +1 -0
- package/dist/tests/filename-affix.vo.test.js +30 -0
- package/dist/tests/filename-from-string.vo.test.d.ts +1 -0
- package/dist/tests/filename-from-string.vo.test.js +37 -0
- package/dist/tests/filename.vo.test.d.ts +1 -0
- package/dist/tests/filename.vo.test.js +93 -0
- package/dist/tests/height-milimiters.vo.test.d.ts +1 -0
- package/dist/tests/height-milimiters.vo.test.js +21 -0
- package/dist/tests/height.vo.test.d.ts +1 -0
- package/dist/tests/height.vo.test.js +64 -0
- package/dist/tests/hour-value.vo.test.d.ts +1 -0
- package/dist/tests/hour-value.vo.test.js +24 -0
- package/dist/tests/hour.vo.test.d.ts +1 -0
- package/dist/tests/hour.vo.test.js +64 -0
- package/dist/tests/iban-mask.service.test.d.ts +1 -0
- package/dist/tests/iban-mask.service.test.js +13 -0
- package/dist/tests/iban-schema.vo.test.d.ts +1 -0
- package/dist/tests/iban-schema.vo.test.js +43 -0
- package/dist/tests/iban.vo.test.d.ts +1 -0
- package/dist/tests/iban.vo.test.js +46 -0
- package/dist/tests/image.vo.test.d.ts +1 -0
- package/dist/tests/image.vo.test.js +41 -0
- package/dist/tests/integer-non-negative.vo.test.d.ts +1 -0
- package/dist/tests/integer-non-negative.vo.test.js +22 -0
- package/dist/tests/integer-positive.vo.test.d.ts +1 -0
- package/dist/tests/integer-positive.vo.test.js +21 -0
- package/dist/tests/integer.vo.test.d.ts +1 -0
- package/dist/tests/integer.vo.test.js +21 -0
- package/dist/tests/language.vo.test.d.ts +1 -0
- package/dist/tests/language.vo.test.js +28 -0
- package/dist/tests/linear-regression.service.test.d.ts +1 -0
- package/dist/tests/linear-regression.service.test.js +111 -0
- package/dist/tests/mean.service.test.d.ts +1 -0
- package/dist/tests/mean.service.test.js +23 -0
- package/dist/tests/mime-registry-entry.vo.test.d.ts +1 -0
- package/dist/tests/mime-registry-entry.vo.test.js +15 -0
- package/dist/tests/mime-registry.service.test.d.ts +1 -0
- package/dist/tests/mime-registry.service.test.js +45 -0
- package/dist/tests/mime-value.vo.test.d.ts +1 -0
- package/dist/tests/mime-value.vo.test.js +49 -0
- package/dist/tests/mime.vo.test.d.ts +1 -0
- package/dist/tests/mime.vo.test.js +53 -0
- package/dist/tests/mimes.test.d.ts +1 -0
- package/dist/tests/mimes.test.js +28 -0
- package/dist/tests/min-max-scaler.service.test.d.ts +1 -0
- package/dist/tests/min-max-scaler.service.test.js +116 -0
- package/dist/tests/minute-value.vo.test.d.ts +1 -0
- package/dist/tests/minute-value.vo.test.js +24 -0
- package/dist/tests/minute.vo.test.d.ts +1 -0
- package/dist/tests/minute.vo.test.js +64 -0
- package/dist/tests/mocks.d.ts +6 -0
- package/dist/tests/mocks.js +7 -0
- package/dist/tests/money-amount.vo.test.d.ts +1 -0
- package/dist/tests/money-amount.vo.test.js +21 -0
- package/dist/tests/money.vo.test.d.ts +1 -0
- package/dist/tests/money.vo.test.js +90 -0
- package/dist/tests/month-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/month-iso-id.vo.test.js +36 -0
- package/dist/tests/month.vo.test.d.ts +1 -0
- package/dist/tests/month.vo.test.js +65 -0
- package/dist/tests/multiplication-factor.vo.test.d.ts +1 -0
- package/dist/tests/multiplication-factor.vo.test.js +19 -0
- package/dist/tests/noop.test.d.ts +1 -0
- package/dist/tests/noop.test.js +12 -0
- package/dist/tests/object-key.vo.test.d.ts +1 -0
- package/dist/tests/object-key.vo.test.js +56 -0
- package/dist/tests/outlier-detector.service.test.d.ts +1 -0
- package/dist/tests/outlier-detector.service.test.js +35 -0
- package/dist/tests/package-version-schema.vo.test.d.ts +1 -0
- package/dist/tests/package-version-schema.vo.test.js +32 -0
- package/dist/tests/package-version.vo.test.d.ts +1 -0
- package/dist/tests/package-version.vo.test.js +138 -0
- package/dist/tests/pagination-page.vo.test.d.ts +1 -0
- package/dist/tests/pagination-page.vo.test.js +26 -0
- package/dist/tests/pagination-skip.vo.test.d.ts +1 -0
- package/dist/tests/pagination-skip.vo.test.js +23 -0
- package/dist/tests/pagination-take.vo.test.d.ts +1 -0
- package/dist/tests/pagination-take.vo.test.js +25 -0
- package/dist/tests/pagination.service.test.d.ts +1 -0
- package/dist/tests/pagination.service.test.js +92 -0
- package/dist/tests/percentage.service.test.d.ts +1 -0
- package/dist/tests/percentage.service.test.js +16 -0
- package/dist/tests/population-standard-deviation.service.test.d.ts +1 -0
- package/dist/tests/population-standard-deviation.service.test.js +20 -0
- package/dist/tests/quarter-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/quarter-iso-id.vo.test.js +30 -0
- package/dist/tests/quarter.vo.test.d.ts +1 -0
- package/dist/tests/quarter.vo.test.js +54 -0
- package/dist/tests/random.service.test.d.ts +1 -0
- package/dist/tests/random.service.test.js +93 -0
- package/dist/tests/rate-limiter.service.test.d.ts +1 -0
- package/dist/tests/rate-limiter.service.test.js +39 -0
- package/dist/tests/relative-date.vo.test.d.ts +1 -0
- package/dist/tests/relative-date.vo.test.js +22 -0
- package/dist/tests/reordering-item-position-value.vo.test.d.ts +1 -0
- package/dist/tests/reordering-item-position-value.vo.test.js +21 -0
- package/dist/tests/reordering.service.test.d.ts +1 -0
- package/dist/tests/reordering.service.test.js +76 -0
- package/dist/tests/repeat.test.d.ts +1 -0
- package/dist/tests/repeat.test.js +8 -0
- package/dist/tests/revision-value.vo.test.d.ts +1 -0
- package/dist/tests/revision-value.vo.test.js +21 -0
- package/dist/tests/revision.vo.test.d.ts +1 -0
- package/dist/tests/revision.vo.test.js +52 -0
- package/dist/tests/rounding-decimal.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-decimal.strategy.test.js +17 -0
- package/dist/tests/rounding-down.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-down.strategy.test.js +9 -0
- package/dist/tests/rounding-to-nearest.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-to-nearest.strategy.test.js +9 -0
- package/dist/tests/rounding-up.strategy.test.d.ts +1 -0
- package/dist/tests/rounding-up.strategy.test.js +9 -0
- package/dist/tests/size-bytes.vo.test.d.ts +1 -0
- package/dist/tests/size-bytes.vo.test.js +21 -0
- package/dist/tests/size.vo.test.d.ts +1 -0
- package/dist/tests/size.vo.test.js +93 -0
- package/dist/tests/slug.service.test.d.ts +1 -0
- package/dist/tests/slug.service.test.js +45 -0
- package/dist/tests/sum.service.test.d.ts +1 -0
- package/dist/tests/sum.service.test.js +22 -0
- package/dist/tests/thousands-separator.service.test.d.ts +1 -0
- package/dist/tests/thousands-separator.service.test.js +27 -0
- package/dist/tests/time-zone-offset-value.test.d.ts +1 -0
- package/dist/tests/time-zone-offset-value.test.js +27 -0
- package/dist/tests/timestamp-value.vo.test.d.ts +1 -0
- package/dist/tests/timestamp-value.vo.test.js +21 -0
- package/dist/tests/timestamp.vo.test.d.ts +1 -0
- package/dist/tests/timestamp.vo.test.js +73 -0
- package/dist/tests/timezone.vo.test.d.ts +1 -0
- package/dist/tests/timezone.vo.test.js +29 -0
- package/dist/tests/url-with-slash.vo.test.d.ts +1 -0
- package/dist/tests/url-with-slash.vo.test.js +24 -0
- package/dist/tests/url-without-slash.vo.test.d.ts +1 -0
- package/dist/tests/url-without-slash.vo.test.js +25 -0
- package/dist/tests/visually-unambiguous-characters-generator.service.test.d.ts +1 -0
- package/dist/tests/visually-unambiguous-characters-generator.service.test.js +89 -0
- package/dist/tests/week-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/week-iso-id.vo.test.js +37 -0
- package/dist/tests/week.vo.test.d.ts +1 -0
- package/dist/tests/week.vo.test.js +64 -0
- package/dist/tests/weekday-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/weekday-iso-id.vo.test.js +24 -0
- package/dist/tests/weekday.vo.test.d.ts +1 -0
- package/dist/tests/weekday.vo.test.js +51 -0
- package/dist/tests/weight-grams.vo.test.d.ts +1 -0
- package/dist/tests/weight-grams.vo.test.js +21 -0
- package/dist/tests/weight.vo.test.d.ts +1 -0
- package/dist/tests/weight.vo.test.js +66 -0
- package/dist/tests/year-iso-id.vo.test.d.ts +1 -0
- package/dist/tests/year-iso-id.vo.test.js +23 -0
- package/dist/tests/year.vo.test.d.ts +1 -0
- package/dist/tests/year.vo.test.js +79 -0
- package/dist/tests/z-score.service.test.d.ts +1 -0
- package/dist/tests/z-score.service.test.js +26 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -12
- package/dist/age-years.vo.d.ts +0 -11
- package/dist/age-years.vo.js +0 -11
- package/dist/api-key.vo.d.ts +0 -8
- package/dist/api-key.vo.js +0 -11
- package/dist/basename.vo.d.ts +0 -12
- package/dist/basename.vo.js +0 -27
- package/dist/day-iso-id.vo.d.ts +0 -9
- package/dist/directory-path-absolute.vo.d.ts +0 -12
- package/dist/directory-path-relative.vo.d.ts +0 -12
- package/dist/distance-value.vo.d.ts +0 -7
- package/dist/distance-value.vo.js +0 -9
- package/dist/division-factor.vo.d.ts +0 -7
- package/dist/division-factor.vo.js +0 -8
- package/dist/duration-ms.vo.d.ts +0 -6
- package/dist/duration-ms.vo.js +0 -4
- package/dist/email.vo.d.ts +0 -6
- package/dist/email.vo.js +0 -4
- package/dist/extension.vo.d.ts +0 -9
- package/dist/extension.vo.js +0 -21
- package/dist/feature-flag-value.vo.d.ts +0 -10
- package/dist/file-path-absolute-schema.vo.d.ts +0 -14
- package/dist/file-path-relative-schema.vo.d.ts +0 -14
- package/dist/filename-affix.vo.d.ts +0 -13
- package/dist/filename-from-string.vo.d.ts +0 -10
- package/dist/height-milimiters.vo.d.ts +0 -7
- package/dist/height-milimiters.vo.js +0 -12
- package/dist/hour-value.vo.d.ts +0 -7
- package/dist/hour-value.vo.js +0 -10
- package/dist/iban-schema.vo.d.ts +0 -7
- package/dist/iban-schema.vo.js +0 -12
- package/dist/image.vo.d.ts +0 -13
- package/dist/image.vo.js +0 -20
- package/dist/integer-non-negative.vo.d.ts +0 -7
- package/dist/integer-non-negative.vo.js +0 -12
- package/dist/integer-positive.vo.d.ts +0 -7
- package/dist/integer-positive.vo.js +0 -9
- package/dist/integer.vo.d.ts +0 -6
- package/dist/integer.vo.js +0 -4
- package/dist/language.vo.d.ts +0 -8
- package/dist/language.vo.js +0 -11
- package/dist/mime-value.vo.d.ts +0 -6
- package/dist/mimes.js +0 -18
- package/dist/minute-value.vo.d.ts +0 -7
- package/dist/minute-value.vo.js +0 -10
- package/dist/money-amount.vo.d.ts +0 -7
- package/dist/money-amount.vo.js +0 -9
- package/dist/month-iso-id.vo.d.ts +0 -8
- package/dist/multiplication-factor.vo.d.ts +0 -7
- package/dist/multiplication-factor.vo.js +0 -11
- package/dist/object-key.vo.d.ts +0 -11
- package/dist/object-key.vo.js +0 -24
- package/dist/package-version-schema.vo.d.ts +0 -8
- package/dist/pagination-page.vo.d.ts +0 -6
- package/dist/pagination-page.vo.js +0 -7
- package/dist/pagination-skip.vo.d.ts +0 -7
- package/dist/pagination-skip.vo.js +0 -6
- package/dist/pagination-take.vo.d.ts +0 -7
- package/dist/pagination-take.vo.js +0 -6
- package/dist/quarter-iso-id.vo.d.ts +0 -7
- package/dist/quarter-iso-id.vo.js +0 -11
- package/dist/reordering-item-position-value.vo.d.ts +0 -6
- package/dist/reordering-item-position-value.vo.js +0 -6
- package/dist/revision-value.vo.d.ts +0 -7
- package/dist/revision-value.vo.js +0 -6
- package/dist/rounding-decimal.strategy.js +0 -19
- package/dist/size-bytes.vo.d.ts +0 -6
- package/dist/size-bytes.vo.js +0 -9
- package/dist/time-zone-offset-value.vo.d.ts +0 -8
- package/dist/time-zone-offset-value.vo.js +0 -17
- package/dist/timestamp-value.vo.d.ts +0 -6
- package/dist/timestamp-value.vo.js +0 -9
- package/dist/timezone.vo.d.ts +0 -9
- package/dist/url-with-slash.vo.d.ts +0 -6
- package/dist/url-with-slash.vo.js +0 -8
- package/dist/url-without-slash.vo.d.ts +0 -6
- package/dist/url-without-slash.vo.js +0 -8
- package/dist/week-iso-id.vo.d.ts +0 -8
- package/dist/weekday-iso-id.vo.d.ts +0 -7
- package/dist/weekday-iso-id.vo.js +0 -10
- package/dist/weight-grams.vo.d.ts +0 -7
- package/dist/weight-grams.vo.js +0 -9
- package/dist/year-iso-id.vo.d.ts +0 -7
- package/dist/year-iso-id.vo.js +0 -10
- package/dist/{age.vo.d.ts → src/age.vo.d.ts} +0 -0
- package/dist/{batch.d.ts → src/batch.d.ts} +0 -0
- package/dist/{batch.js → src/batch.js} +0 -0
- package/dist/{date-calculator.service.d.ts → src/date-calculator.service.d.ts} +0 -0
- package/dist/{date-calculator.service.js → src/date-calculator.service.js} +0 -0
- package/dist/{date-formatter.service.d.ts → src/date-formatter.service.d.ts} +0 -0
- package/dist/{date-formatter.service.js → src/date-formatter.service.js} +0 -0
- package/dist/{date-range.vo.d.ts → src/date-range.vo.d.ts} +0 -0
- package/dist/{date-range.vo.js → src/date-range.vo.js} +0 -0
- package/dist/{day.vo.d.ts → src/day.vo.d.ts} +1 -1
- /package/dist/{distance.vo.d.ts → src/distance.vo.d.ts} +0 -0
- /package/dist/{dll.service.d.ts → src/dll.service.d.ts} +0 -0
- /package/dist/{dll.service.js → src/dll.service.js} +0 -0
- /package/dist/{duration.service.d.ts → src/duration.service.d.ts} +0 -0
- /package/dist/{email-mask.service.d.ts → src/email-mask.service.d.ts} +0 -0
- /package/dist/{email-mask.service.js → src/email-mask.service.js} +0 -0
- /package/dist/{etags.vo.d.ts → src/etags.vo.d.ts} +0 -0
- /package/dist/{feature-flag.vo.d.ts → src/feature-flag.vo.d.ts} +0 -0
- /package/dist/{feature-flag.vo.js → src/feature-flag.vo.js} +0 -0
- /package/dist/{file-path.vo.d.ts → src/file-path.vo.d.ts} +0 -0
- /package/dist/{filename.vo.d.ts → src/filename.vo.d.ts} +0 -0
- /package/dist/{height.vo.d.ts → src/height.vo.d.ts} +0 -0
- /package/dist/{hour.vo.d.ts → src/hour.vo.d.ts} +0 -0
- /package/dist/{iban-mask.service.d.ts → src/iban-mask.service.d.ts} +0 -0
- /package/dist/{iban-mask.service.js → src/iban-mask.service.js} +0 -0
- /package/dist/{iban.vo.d.ts → src/iban.vo.d.ts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{linear-regression.service.d.ts → src/linear-regression.service.d.ts} +0 -0
- /package/dist/{linear-regression.service.js → src/linear-regression.service.js} +0 -0
- /package/dist/{mean.service.d.ts → src/mean.service.d.ts} +0 -0
- /package/dist/{mean.service.js → src/mean.service.js} +0 -0
- /package/dist/{mime-registry-entry.vo.d.ts → src/mime-registry-entry.vo.d.ts} +0 -0
- /package/dist/{mime-registry-entry.vo.js → src/mime-registry-entry.vo.js} +0 -0
- /package/dist/{mime-registry.service.d.ts → src/mime-registry.service.d.ts} +0 -0
- /package/dist/{mime-registry.service.js → src/mime-registry.service.js} +0 -0
- /package/dist/{mime.vo.d.ts → src/mime.vo.d.ts} +0 -0
- /package/dist/{mimes.d.ts → src/mimes.d.ts} +0 -0
- /package/dist/{min-max-scaler.service.d.ts → src/min-max-scaler.service.d.ts} +0 -0
- /package/dist/{min-max-scaler.service.js → src/min-max-scaler.service.js} +0 -0
- /package/dist/{minute.vo.d.ts → src/minute.vo.d.ts} +0 -0
- /package/dist/{money.vo.d.ts → src/money.vo.d.ts} +0 -0
- /package/dist/{month.vo.d.ts → src/month.vo.d.ts} +0 -0
- /package/dist/{noop.service.d.ts → src/noop.service.d.ts} +0 -0
- /package/dist/{noop.service.js → src/noop.service.js} +0 -0
- /package/dist/{outlier-detector.service.d.ts → src/outlier-detector.service.d.ts} +0 -0
- /package/dist/{outlier-detector.service.js → src/outlier-detector.service.js} +0 -0
- /package/dist/{package-version.vo.d.ts → src/package-version.vo.d.ts} +0 -0
- /package/dist/{pagination.service.d.ts → src/pagination.service.d.ts} +0 -0
- /package/dist/{percentage.service.d.ts → src/percentage.service.d.ts} +0 -0
- /package/dist/{percentage.service.js → src/percentage.service.js} +0 -0
- /package/dist/{population-standard-deviation.service.d.ts → src/population-standard-deviation.service.d.ts} +0 -0
- /package/dist/{population-standard-deviation.service.js → src/population-standard-deviation.service.js} +0 -0
- /package/dist/{quarter.vo.d.ts → src/quarter.vo.d.ts} +0 -0
- /package/dist/{random.service.d.ts → src/random.service.d.ts} +0 -0
- /package/dist/{random.service.js → src/random.service.js} +0 -0
- /package/dist/{rate-limiter.service.d.ts → src/rate-limiter.service.d.ts} +0 -0
- /package/dist/{rate-limiter.service.js → src/rate-limiter.service.js} +0 -0
- /package/dist/{relative-date.vo.d.ts → src/relative-date.vo.d.ts} +0 -0
- /package/dist/{relative-date.vo.js → src/relative-date.vo.js} +0 -0
- /package/dist/{repeat.d.ts → src/repeat.d.ts} +0 -0
- /package/dist/{repeat.js → src/repeat.js} +0 -0
- /package/dist/{revision.vo.d.ts → src/revision.vo.d.ts} +0 -0
- /package/dist/{rounding-down.strategy.d.ts → src/rounding-down.strategy.d.ts} +0 -0
- /package/dist/{rounding-down.strategy.js → src/rounding-down.strategy.js} +0 -0
- /package/dist/{rounding-to-nearest.strategy.d.ts → src/rounding-to-nearest.strategy.d.ts} +0 -0
- /package/dist/{rounding-to-nearest.strategy.js → src/rounding-to-nearest.strategy.js} +0 -0
- /package/dist/{rounding-up.strategy.d.ts → src/rounding-up.strategy.d.ts} +0 -0
- /package/dist/{rounding-up.strategy.js → src/rounding-up.strategy.js} +0 -0
- /package/dist/{rounding.strategy.d.ts → src/rounding.strategy.d.ts} +0 -0
- /package/dist/{rounding.strategy.js → src/rounding.strategy.js} +0 -0
- /package/dist/{size.vo.d.ts → src/size.vo.d.ts} +0 -0
- /package/dist/{slug.service.d.ts → src/slug.service.d.ts} +0 -0
- /package/dist/{slug.service.js → src/slug.service.js} +0 -0
- /package/dist/{sum.service.d.ts → src/sum.service.d.ts} +0 -0
- /package/dist/{sum.service.js → src/sum.service.js} +0 -0
- /package/dist/{thousands-separator.service.d.ts → src/thousands-separator.service.d.ts} +0 -0
- /package/dist/{thousands-separator.service.js → src/thousands-separator.service.js} +0 -0
- /package/dist/{timestamp.vo.d.ts → src/timestamp.vo.d.ts} +0 -0
- /package/dist/{ts-utils.d.ts → src/ts-utils.d.ts} +0 -0
- /package/dist/{ts-utils.js → src/ts-utils.js} +0 -0
- /package/dist/{visually-unambiguous-characters-generator.service.d.ts → src/visually-unambiguous-characters-generator.service.d.ts} +0 -0
- /package/dist/{visually-unambiguous-characters-generator.service.js → src/visually-unambiguous-characters-generator.service.js} +0 -0
- /package/dist/{week.vo.d.ts → src/week.vo.d.ts} +0 -0
- /package/dist/{weekday.vo.d.ts → src/weekday.vo.d.ts} +0 -0
- /package/dist/{weight.vo.d.ts → src/weight.vo.d.ts} +0 -0
- /package/dist/{year.vo.d.ts → src/year.vo.d.ts} +0 -0
- /package/dist/{z-score.service.d.ts → src/z-score.service.d.ts} +0 -0
- /package/dist/{z-score.service.js → src/z-score.service.js} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { Duration } from "../src/duration.service";
|
|
4
|
+
import { Timestamp } from "../src/timestamp.vo";
|
|
5
|
+
import { TimestampValue } from "../src/timestamp-value.vo";
|
|
6
|
+
import * as mocks from "./mocks";
|
|
7
|
+
describe("Timestamp", () => {
|
|
8
|
+
test("fromValue - success", () => {
|
|
9
|
+
expect(Timestamp.fromValue(mocks.TIME_ZERO.ms));
|
|
10
|
+
});
|
|
11
|
+
test("fromValue - error", () => {
|
|
12
|
+
expect(() => Timestamp.fromValue(v.parse(TimestampValue, -1))).toThrow("timestamp.invalid");
|
|
13
|
+
});
|
|
14
|
+
test("fromNumber - success", () => {
|
|
15
|
+
expect(Timestamp.fromNumber(mocks.TIME_ZERO.ms));
|
|
16
|
+
});
|
|
17
|
+
test("fromNumber - error", () => {
|
|
18
|
+
expect(() => Timestamp.fromNumber(-1)).toThrow("timestamp.invalid");
|
|
19
|
+
});
|
|
20
|
+
test("fromDate - success", () => {
|
|
21
|
+
expect(Timestamp.fromDate(mocks.TIME_ZERO_DATE));
|
|
22
|
+
});
|
|
23
|
+
test("fromDate - error", () => {
|
|
24
|
+
expect(() => Timestamp.fromDate(new Date("invalid"))).toThrow("timestamp.invalid");
|
|
25
|
+
});
|
|
26
|
+
test("fromDateLike - success", () => {
|
|
27
|
+
expect(Timestamp.fromDateLike(mocks.TIME_ZERO_DATE_LIKE));
|
|
28
|
+
});
|
|
29
|
+
test("fromDateLike - error", () => {
|
|
30
|
+
expect(() => Timestamp.fromDateLike("invalid")).toThrow("timestamp.invalid");
|
|
31
|
+
});
|
|
32
|
+
test("add", () => {
|
|
33
|
+
expect(mocks.TIME_ZERO.add(Duration.Ms(500)).ms).toEqual(v.parse(TimestampValue, mocks.TIME_ZERO.ms + 500));
|
|
34
|
+
});
|
|
35
|
+
test("subtract", () => {
|
|
36
|
+
expect(mocks.TIME_ZERO.subtract(Duration.Ms(500)).ms).toEqual(v.parse(TimestampValue, mocks.TIME_ZERO.ms - 500));
|
|
37
|
+
});
|
|
38
|
+
test("difference", () => {
|
|
39
|
+
expect(mocks.TIME_ZERO.difference(mocks.TIME_ZERO.subtract(Duration.Minutes(30)))).toEqual(Duration.Minutes(30));
|
|
40
|
+
});
|
|
41
|
+
test("isBefore", () => {
|
|
42
|
+
expect(mocks.TIME_ZERO.isBefore(Timestamp.fromNumber(Date.now()))).toEqual(true);
|
|
43
|
+
expect(mocks.TIME_ZERO.isBefore(Timestamp.fromNumber(0))).toEqual(false);
|
|
44
|
+
expect(mocks.TIME_ZERO.isBefore(mocks.TIME_ZERO)).toEqual(false);
|
|
45
|
+
});
|
|
46
|
+
test("isBeforeOrEqual", () => {
|
|
47
|
+
expect(mocks.TIME_ZERO.isBeforeOrEqual(Timestamp.fromNumber(Date.now()))).toEqual(true);
|
|
48
|
+
expect(mocks.TIME_ZERO.isBeforeOrEqual(Timestamp.fromNumber(0))).toEqual(false);
|
|
49
|
+
expect(mocks.TIME_ZERO.isBeforeOrEqual(mocks.TIME_ZERO)).toEqual(true);
|
|
50
|
+
});
|
|
51
|
+
test("isAfter", () => {
|
|
52
|
+
expect(mocks.TIME_ZERO.isAfter(Timestamp.fromNumber(0))).toEqual(true);
|
|
53
|
+
expect(mocks.TIME_ZERO.isAfter(Timestamp.fromNumber(Date.now()))).toEqual(false);
|
|
54
|
+
expect(mocks.TIME_ZERO.isAfter(mocks.TIME_ZERO)).toEqual(false);
|
|
55
|
+
});
|
|
56
|
+
test("isAfterOrEqual", () => {
|
|
57
|
+
expect(mocks.TIME_ZERO.isAfterOrEqual(Timestamp.fromNumber(Date.now()))).toEqual(false);
|
|
58
|
+
expect(mocks.TIME_ZERO.isAfterOrEqual(Timestamp.fromNumber(0))).toEqual(true);
|
|
59
|
+
expect(mocks.TIME_ZERO.isAfterOrEqual(mocks.TIME_ZERO)).toEqual(true);
|
|
60
|
+
});
|
|
61
|
+
test("equals", () => {
|
|
62
|
+
expect(mocks.TIME_ZERO.equals(mocks.TIME_ZERO)).toEqual(true);
|
|
63
|
+
});
|
|
64
|
+
test("get", () => {
|
|
65
|
+
expect(mocks.TIME_ZERO.ms).toEqual(mocks.TIME_ZERO.ms);
|
|
66
|
+
});
|
|
67
|
+
test("toJSON", () => {
|
|
68
|
+
expect(mocks.TIME_ZERO.toJSON()).toEqual(mocks.TIME_ZERO.ms);
|
|
69
|
+
});
|
|
70
|
+
test("toString", () => {
|
|
71
|
+
expect(mocks.TIME_ZERO.toString()).toEqual(mocks.TIME_ZERO.ms.toString());
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { Timezone } from "../src/timezone.vo";
|
|
4
|
+
describe("Timezone", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
const valid = ["UTC", "America/New_York", "Europe/London", "Asia/Tokyo"];
|
|
7
|
+
for (const value of valid) {
|
|
8
|
+
expect(v.safeParse(Timezone, value).success).toEqual(true);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
test("rejects empty", () => {
|
|
12
|
+
expect(() => v.parse(Timezone, "")).toThrow("timezone.empty");
|
|
13
|
+
});
|
|
14
|
+
test("rejects non-string - null", () => {
|
|
15
|
+
expect(() => v.parse(Timezone, null)).toThrow("timezone.type");
|
|
16
|
+
});
|
|
17
|
+
test("rejects non-string - number", () => {
|
|
18
|
+
expect(() => v.parse(Timezone, 123)).toThrow("timezone.type");
|
|
19
|
+
});
|
|
20
|
+
test("rejects too long", () => {
|
|
21
|
+
expect(() => v.parse(Timezone, "a".repeat(129))).toThrow("timezone.too.long");
|
|
22
|
+
});
|
|
23
|
+
test("rejects invalid timezones", () => {
|
|
24
|
+
const invalid = ["invalid-timezone", "Moon/Base1", "GMT+25"];
|
|
25
|
+
for (const value of invalid) {
|
|
26
|
+
expect(() => v.parse(Timezone, value)).toThrow("timezone.invalid");
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { UrlWithSlash } from "../src/url-with-slash.vo";
|
|
4
|
+
describe("UrlWithSlash", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
expect(v.safeParse(UrlWithSlash, "https://example.com/").success).toEqual(true);
|
|
7
|
+
expect(v.safeParse(UrlWithSlash, "http://localhost/foo/bar/").success).toEqual(true);
|
|
8
|
+
});
|
|
9
|
+
test("rejects empty", () => {
|
|
10
|
+
expect(() => v.parse(UrlWithSlash, "")).toThrow("url.with.slash.invalid");
|
|
11
|
+
});
|
|
12
|
+
test("rejects non-string - null", () => {
|
|
13
|
+
expect(() => v.parse(UrlWithSlash, null)).toThrow("url.with.slash.invalid");
|
|
14
|
+
});
|
|
15
|
+
test("rejects non-string - number", () => {
|
|
16
|
+
expect(() => v.parse(UrlWithSlash, 123)).toThrow("url.with.slash.invalid");
|
|
17
|
+
});
|
|
18
|
+
test("rejects invalid url", () => {
|
|
19
|
+
expect(() => v.parse(UrlWithSlash, "not-a-url")).toThrow("url.with.slash.invalid");
|
|
20
|
+
});
|
|
21
|
+
test("rejects url without slash", () => {
|
|
22
|
+
expect(() => v.parse(UrlWithSlash, "https://example.com")).toThrow("url.with.slash.invalid");
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { UrlWithoutSlash } from "../src/url-without-slash.vo";
|
|
4
|
+
describe("UrlWithoutSlash", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
expect(v.safeParse(UrlWithoutSlash, "https://example.com").success).toEqual(true);
|
|
7
|
+
expect(v.safeParse(UrlWithoutSlash, "http://localhost/foo/bar").success).toEqual(true);
|
|
8
|
+
expect(v.safeParse(UrlWithoutSlash, "http://localhost:3000").success).toEqual(true);
|
|
9
|
+
});
|
|
10
|
+
test("rejects empty", () => {
|
|
11
|
+
expect(() => v.parse(UrlWithoutSlash, "")).toThrow("url.without.slash.invalid");
|
|
12
|
+
});
|
|
13
|
+
test("rejects non-string - null", () => {
|
|
14
|
+
expect(() => v.parse(UrlWithoutSlash, null)).toThrow("url.without.slash.invalid");
|
|
15
|
+
});
|
|
16
|
+
test("rejects non-string - number", () => {
|
|
17
|
+
expect(() => v.parse(UrlWithoutSlash, 123)).toThrow("url.without.slash.invalid");
|
|
18
|
+
});
|
|
19
|
+
test("rejects invalid url", () => {
|
|
20
|
+
expect(() => v.parse(UrlWithoutSlash, "not-a-url")).toThrow("url.without.slash.invalid");
|
|
21
|
+
});
|
|
22
|
+
test("rejects url with slash", () => {
|
|
23
|
+
expect(() => v.parse(UrlWithoutSlash, "https://example.com/")).toThrow("url.without.slash.invalid");
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
|
|
2
|
+
if (value !== null && value !== void 0) {
|
|
3
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
4
|
+
var dispose, inner;
|
|
5
|
+
if (async) {
|
|
6
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
7
|
+
dispose = value[Symbol.asyncDispose];
|
|
8
|
+
}
|
|
9
|
+
if (dispose === void 0) {
|
|
10
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
11
|
+
dispose = value[Symbol.dispose];
|
|
12
|
+
if (async) inner = dispose;
|
|
13
|
+
}
|
|
14
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
15
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
16
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
17
|
+
}
|
|
18
|
+
else if (async) {
|
|
19
|
+
env.stack.push({ async: true });
|
|
20
|
+
}
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
23
|
+
var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
|
|
24
|
+
return function (env) {
|
|
25
|
+
function fail(e) {
|
|
26
|
+
env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
27
|
+
env.hasError = true;
|
|
28
|
+
}
|
|
29
|
+
var r, s = 0;
|
|
30
|
+
function next() {
|
|
31
|
+
while (r = env.stack.pop()) {
|
|
32
|
+
try {
|
|
33
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
34
|
+
if (r.dispose) {
|
|
35
|
+
var result = r.dispose.call(r.value);
|
|
36
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
37
|
+
}
|
|
38
|
+
else s |= 1;
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
fail(e);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
45
|
+
if (env.hasError) throw env.error;
|
|
46
|
+
}
|
|
47
|
+
return next();
|
|
48
|
+
};
|
|
49
|
+
})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
50
|
+
var e = new Error(message);
|
|
51
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
|
+
});
|
|
53
|
+
import { describe, expect, spyOn, test } from "bun:test";
|
|
54
|
+
import { Random } from "../src/random.service";
|
|
55
|
+
import { VisuallyUnambiguousCharactersGenerator } from "../src/visually-unambiguous-characters-generator.service";
|
|
56
|
+
describe("VisuallyUnambiguousCharactersGenerator", () => {
|
|
57
|
+
test("default length", () => {
|
|
58
|
+
expect(VisuallyUnambiguousCharactersGenerator.chars).toContain(VisuallyUnambiguousCharactersGenerator.generate());
|
|
59
|
+
});
|
|
60
|
+
test("length of 5", () => {
|
|
61
|
+
const result = VisuallyUnambiguousCharactersGenerator.generate(5);
|
|
62
|
+
expect(result.length).toEqual(5);
|
|
63
|
+
result.split("").forEach((character) => {
|
|
64
|
+
expect(VisuallyUnambiguousCharactersGenerator.chars).toContain(character);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
test("single charactes allowed", () => {
|
|
68
|
+
VisuallyUnambiguousCharactersGenerator.chars.forEach((character) => expect(character.length).toEqual(1));
|
|
69
|
+
expect(VisuallyUnambiguousCharactersGenerator.chars.length).toBeGreaterThan(0);
|
|
70
|
+
});
|
|
71
|
+
test("correct random bounds", () => {
|
|
72
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
73
|
+
try {
|
|
74
|
+
const randomSpy = __addDisposableResource(env_1, spyOn(Random, "generate").mockReturnValue(0), false);
|
|
75
|
+
VisuallyUnambiguousCharactersGenerator.generate();
|
|
76
|
+
expect(randomSpy).toHaveBeenCalledWith({
|
|
77
|
+
min: 0,
|
|
78
|
+
max: VisuallyUnambiguousCharactersGenerator.chars.length - 1,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
catch (e_1) {
|
|
82
|
+
env_1.error = e_1;
|
|
83
|
+
env_1.hasError = true;
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
__disposeResources(env_1);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { WeekIsoId } from "../src/week-iso-id.vo";
|
|
4
|
+
describe("WeekIsoId", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
expect(v.safeParse(WeekIsoId, "2025-W30").success).toEqual(true);
|
|
7
|
+
expect(v.safeParse(WeekIsoId, "2026-W01").success).toEqual(true);
|
|
8
|
+
expect(v.safeParse(WeekIsoId, "2020-W53").success).toEqual(true);
|
|
9
|
+
});
|
|
10
|
+
test("rejects prefix", () => {
|
|
11
|
+
expect(() => v.parse(WeekIsoId, "prefix2025-W01")).toThrow("week.iso.id.bad.chars");
|
|
12
|
+
});
|
|
13
|
+
test("rejects suffix", () => {
|
|
14
|
+
expect(() => v.parse(WeekIsoId, "2025-W01suffix")).toThrow("week.iso.id.bad.chars");
|
|
15
|
+
});
|
|
16
|
+
test("rejects empty", () => {
|
|
17
|
+
expect(() => v.parse(WeekIsoId, "")).toThrow("week.iso.id.bad.chars");
|
|
18
|
+
});
|
|
19
|
+
test("rejects non-string - null", () => {
|
|
20
|
+
expect(() => v.parse(WeekIsoId, null)).toThrow("week.iso.id.type");
|
|
21
|
+
});
|
|
22
|
+
test("rejects non-string - number", () => {
|
|
23
|
+
expect(() => v.parse(WeekIsoId, 123)).toThrow("week.iso.id.type");
|
|
24
|
+
});
|
|
25
|
+
test("rejects strings not matching the format", () => {
|
|
26
|
+
expect(() => v.parse(WeekIsoId, "2025-30")).toThrow("week.iso.id.bad.chars");
|
|
27
|
+
expect(() => v.parse(WeekIsoId, "25-W30")).toThrow("week.iso.id.bad.chars");
|
|
28
|
+
expect(() => v.parse(WeekIsoId, "2025-W3")).toThrow("week.iso.id.bad.chars");
|
|
29
|
+
});
|
|
30
|
+
test("rejects week numbers < 1 or > 53", () => {
|
|
31
|
+
expect(() => v.parse(WeekIsoId, "2025-W00")).toThrow("week.iso.id.invalid");
|
|
32
|
+
expect(() => v.parse(WeekIsoId, "2025-W54")).toThrow("week.iso.id.invalid");
|
|
33
|
+
});
|
|
34
|
+
test("rejects week 53 in a year that only has 52 ISO weeks", () => {
|
|
35
|
+
expect(() => v.parse(WeekIsoId, "2021-W53")).toThrow("week.iso.id.invalid");
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import { endOfISOWeek, startOfISOWeek } from "date-fns";
|
|
3
|
+
import * as v from "valibot";
|
|
4
|
+
import { Duration } from "../src/duration.service";
|
|
5
|
+
import { Integer } from "../src/integer.vo";
|
|
6
|
+
import { Timestamp } from "../src/timestamp.vo";
|
|
7
|
+
import { Week } from "../src/week.vo";
|
|
8
|
+
import { WeekIsoId } from "../src/week-iso-id.vo";
|
|
9
|
+
import * as mocks from "./mocks";
|
|
10
|
+
const w46 = v.parse(WeekIsoId, "2023-W46");
|
|
11
|
+
describe("Week", () => {
|
|
12
|
+
test("happy path", () => {
|
|
13
|
+
const week = Week.fromTimestamp(mocks.TIME_ZERO);
|
|
14
|
+
const expectedStart = Timestamp.fromNumber(startOfISOWeek(mocks.TIME_ZERO.ms).getTime());
|
|
15
|
+
const expectedEnd = Timestamp.fromNumber(endOfISOWeek(mocks.TIME_ZERO.ms).getTime());
|
|
16
|
+
expect(week.getStart()).toEqual(expectedStart);
|
|
17
|
+
expect(week.getEnd()).toEqual(expectedEnd);
|
|
18
|
+
expect(week.toIsoId()).toEqual(w46);
|
|
19
|
+
expect(week.contains(mocks.TIME_ZERO)).toEqual(true);
|
|
20
|
+
});
|
|
21
|
+
test("happy path - ISO week spills into the next year", () => {
|
|
22
|
+
const timestamp = Timestamp.fromDateLike("2025-12-31T23:59:59Z");
|
|
23
|
+
const week = Week.fromTimestamp(timestamp);
|
|
24
|
+
expect(week.toIsoId()).toEqual(v.parse(WeekIsoId, "2026-W01"));
|
|
25
|
+
expect(week.getStart()).toEqual(Timestamp.fromNumber(startOfISOWeek(timestamp.ms).getTime()));
|
|
26
|
+
expect(week.getEnd()).toEqual(Timestamp.fromNumber(endOfISOWeek(timestamp.ms).getTime()));
|
|
27
|
+
});
|
|
28
|
+
test("fromNow", () => {
|
|
29
|
+
expect(Week.fromNow(mocks.TIME_ZERO).toIsoId()).toEqual(w46);
|
|
30
|
+
});
|
|
31
|
+
test("fromTimestamp", () => {
|
|
32
|
+
expect(Week.fromTimestamp(mocks.TIME_ZERO).toIsoId()).toEqual(w46);
|
|
33
|
+
});
|
|
34
|
+
test("fromTimestampValue", () => {
|
|
35
|
+
expect(Week.fromTimestampValue(mocks.TIME_ZERO.ms).toIsoId()).toEqual(w46);
|
|
36
|
+
});
|
|
37
|
+
test("fromIsoId", () => {
|
|
38
|
+
expect(Week.fromIsoId(w46).toIsoId()).toEqual(w46);
|
|
39
|
+
});
|
|
40
|
+
test("next", () => {
|
|
41
|
+
expect(Week.fromTimestamp(mocks.TIME_ZERO).next().toIsoId()).toEqual(v.parse(WeekIsoId, "2023-W47"));
|
|
42
|
+
});
|
|
43
|
+
test("previous", () => {
|
|
44
|
+
expect(Week.fromTimestamp(mocks.TIME_ZERO).previous().toIsoId()).toEqual(v.parse(WeekIsoId, "2023-W45"));
|
|
45
|
+
});
|
|
46
|
+
test("shift", () => {
|
|
47
|
+
expect(Week.fromTimestamp(mocks.TIME_ZERO).shift(v.parse(Integer, 2)).toIsoId()).toEqual(v.parse(WeekIsoId, "2023-W48"));
|
|
48
|
+
expect(Week.fromTimestamp(mocks.TIME_ZERO).shift(v.parse(Integer, -2)).toIsoId()).toEqual(v.parse(WeekIsoId, "2023-W44"));
|
|
49
|
+
});
|
|
50
|
+
test("round-trips", () => {
|
|
51
|
+
expect(Week.fromIsoId(w46).toIsoId()).toEqual(w46);
|
|
52
|
+
});
|
|
53
|
+
test("contains", () => {
|
|
54
|
+
const week = Week.fromTimestamp(mocks.TIME_ZERO);
|
|
55
|
+
expect(week.contains(week.getStart().subtract(Duration.Ms(1)))).toEqual(false);
|
|
56
|
+
expect(week.contains(week.getEnd().add(Duration.Ms(1)))).toEqual(false);
|
|
57
|
+
});
|
|
58
|
+
test("toString", () => {
|
|
59
|
+
expect(Week.fromIsoId(w46).toString()).toEqual(w46);
|
|
60
|
+
});
|
|
61
|
+
test("toJSON", () => {
|
|
62
|
+
expect(Week.fromIsoId(w46).toJSON()).toEqual({ start: 1699833600000, end: 1700438399999 });
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { WeekdayIsoId } from "../src/weekday-iso-id.vo";
|
|
4
|
+
describe("WeekdayIsoId VO", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
expect(v.safeParse(WeekdayIsoId, 1).success).toEqual(true);
|
|
7
|
+
expect(v.safeParse(WeekdayIsoId, 7).success).toEqual(true);
|
|
8
|
+
});
|
|
9
|
+
test("rejects non-number - null", () => {
|
|
10
|
+
expect(() => v.parse(WeekdayIsoId, null)).toThrow("weekday.iso.id.type");
|
|
11
|
+
});
|
|
12
|
+
test("rejects non-number - string", () => {
|
|
13
|
+
expect(() => v.parse(WeekdayIsoId, "100")).toThrow("weekday.iso.id.type");
|
|
14
|
+
});
|
|
15
|
+
test("rejects fraction", () => {
|
|
16
|
+
expect(() => v.parse(WeekdayIsoId, 100.5)).toThrow("weekday.iso.id.type");
|
|
17
|
+
});
|
|
18
|
+
test("rejects too small", () => {
|
|
19
|
+
expect(() => v.parse(WeekdayIsoId, 0)).toThrow("weekday.iso.id.invalid");
|
|
20
|
+
});
|
|
21
|
+
test("rejects too big", () => {
|
|
22
|
+
expect(() => v.parse(WeekdayIsoId, 8)).toThrow("weekday.iso.id.invalid");
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { Timestamp } from "../src/timestamp.vo";
|
|
4
|
+
import { Weekday } from "../src/weekday.vo";
|
|
5
|
+
import { WeekdayIsoId } from "../src/weekday-iso-id.vo";
|
|
6
|
+
import * as mocks from "./mocks";
|
|
7
|
+
describe("Weekday", () => {
|
|
8
|
+
test("predefined", () => {
|
|
9
|
+
expect(Weekday.MONDAY.isMonday()).toEqual(true);
|
|
10
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 1)).get()).toEqual(v.parse(WeekdayIsoId, 1));
|
|
11
|
+
expect(Weekday.TUESDAY.isTuesday()).toEqual(true);
|
|
12
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 2)).get()).toEqual(v.parse(WeekdayIsoId, 2));
|
|
13
|
+
expect(Weekday.WEDNESDAY.isWednesday()).toEqual(true);
|
|
14
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 3)).get()).toEqual(v.parse(WeekdayIsoId, 3));
|
|
15
|
+
expect(Weekday.THURSDAY.isThursday()).toEqual(true);
|
|
16
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 4)).get()).toEqual(v.parse(WeekdayIsoId, 4));
|
|
17
|
+
expect(Weekday.FRIDAY.isFriday()).toEqual(true);
|
|
18
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 5)).get()).toEqual(v.parse(WeekdayIsoId, 5));
|
|
19
|
+
expect(Weekday.SATURDAY.isSaturday()).toEqual(true);
|
|
20
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 6)).get()).toEqual(v.parse(WeekdayIsoId, 6));
|
|
21
|
+
expect(Weekday.SUNDAY.isSunday()).toEqual(true);
|
|
22
|
+
expect(Weekday.fromIsoId(v.parse(WeekdayIsoId, 7)).get()).toEqual(v.parse(WeekdayIsoId, 7));
|
|
23
|
+
});
|
|
24
|
+
test("fromTimestamp", () => {
|
|
25
|
+
const weekday = Weekday.fromTimestamp(mocks.TIME_ZERO);
|
|
26
|
+
expect(weekday.isTuesday()).toEqual(true);
|
|
27
|
+
});
|
|
28
|
+
test("fromTimestamp - sunday", () => {
|
|
29
|
+
const timestamp = Timestamp.fromDateLike("2026-02-08T12:00:00.000Z");
|
|
30
|
+
const weekday = Weekday.fromTimestamp(timestamp);
|
|
31
|
+
expect(weekday.isSunday()).toEqual(true);
|
|
32
|
+
});
|
|
33
|
+
test("fromTimestampValue", () => {
|
|
34
|
+
const weekday = Weekday.fromTimestampValue(mocks.TIME_ZERO.ms);
|
|
35
|
+
expect(weekday.isTuesday()).toEqual(true);
|
|
36
|
+
});
|
|
37
|
+
test("fromIsoId", () => {
|
|
38
|
+
const weekday = Weekday.fromIsoId(v.parse(WeekdayIsoId, 1));
|
|
39
|
+
expect(weekday.isMonday()).toEqual(true);
|
|
40
|
+
});
|
|
41
|
+
test("equals", () => {
|
|
42
|
+
expect(Weekday.MONDAY.equals(Weekday.MONDAY)).toEqual(true);
|
|
43
|
+
expect(Weekday.MONDAY.equals(Weekday.WEDNESDAY)).toEqual(false);
|
|
44
|
+
});
|
|
45
|
+
test("toString", () => {
|
|
46
|
+
expect(Weekday.MONDAY.toString()).toEqual("1");
|
|
47
|
+
});
|
|
48
|
+
test("toJSON", () => {
|
|
49
|
+
expect(Weekday.MONDAY.toJSON()).toEqual(1);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { WeightGrams } from "../src/weight-grams.vo";
|
|
4
|
+
describe("WeightGrams", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
expect(v.safeParse(WeightGrams, 0).success).toEqual(true);
|
|
7
|
+
expect(v.safeParse(WeightGrams, 130).success).toEqual(true);
|
|
8
|
+
});
|
|
9
|
+
test("rejects non-number - null", () => {
|
|
10
|
+
expect(() => v.parse(WeightGrams, null)).toThrow("weight.grams.type");
|
|
11
|
+
});
|
|
12
|
+
test("rejects non-number - string", () => {
|
|
13
|
+
expect(() => v.parse(WeightGrams, "123")).toThrow("weight.grams.type");
|
|
14
|
+
});
|
|
15
|
+
test("rejects negative numbers", () => {
|
|
16
|
+
expect(() => v.parse(WeightGrams, -1)).toThrow("weight.grams.invalid");
|
|
17
|
+
});
|
|
18
|
+
test("rejects fractions", () => {
|
|
19
|
+
expect(() => v.parse(WeightGrams, 1.5)).toThrow("weight.grams.type");
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { DivisionFactor } from "../src/division-factor.vo";
|
|
4
|
+
import { MultiplicationFactor } from "../src/multiplication-factor.vo";
|
|
5
|
+
import { RoundingDecimalStrategy } from "../src/rounding-decimal.strategy";
|
|
6
|
+
import { Weight } from "../src/weight.vo";
|
|
7
|
+
const twoDecimals = new RoundingDecimalStrategy(2);
|
|
8
|
+
const threeDecimals = new RoundingDecimalStrategy(3);
|
|
9
|
+
const factor = v.parse(DivisionFactor, 3);
|
|
10
|
+
describe("Weight", () => {
|
|
11
|
+
test("fromKilograms", () => {
|
|
12
|
+
expect(Weight.fromKilograms(0.1).get()).toEqual(100);
|
|
13
|
+
expect(Weight.fromKilograms(0.333).get()).toEqual(333);
|
|
14
|
+
expect(Weight.fromKilograms(20).get()).toEqual(20_000);
|
|
15
|
+
});
|
|
16
|
+
test("fromGrams", () => {
|
|
17
|
+
expect(Weight.fromGrams(5).get()).toEqual(5);
|
|
18
|
+
});
|
|
19
|
+
test("guards invalid inputs", () => {
|
|
20
|
+
expect(() => Weight.fromKilograms(-1)).toThrow("weight.grams.invalid");
|
|
21
|
+
});
|
|
22
|
+
test("toKilograms", () => {
|
|
23
|
+
expect(Weight.fromKilograms(10, threeDecimals).toKilograms()).toEqual(10.0);
|
|
24
|
+
});
|
|
25
|
+
test("format", () => {
|
|
26
|
+
expect(Weight.fromKilograms(12.5, twoDecimals).format()).toEqual("12500 g");
|
|
27
|
+
});
|
|
28
|
+
test("operations", () => {
|
|
29
|
+
const a = Weight.fromGrams(19_600);
|
|
30
|
+
const b = a.add(Weight.fromKilograms(0.7));
|
|
31
|
+
expect(b.get()).toEqual(20_300);
|
|
32
|
+
expect(Weight.fromGrams(1_000).subtract(Weight.fromGrams(2_000)).get()).toEqual(0);
|
|
33
|
+
expect(Weight.fromGrams(1_000).subtract(Weight.fromGrams(1_000)).get()).toEqual(0);
|
|
34
|
+
expect(Weight.fromGrams(1_001).multiply(v.parse(MultiplicationFactor, 0.5)).get()).toEqual(501);
|
|
35
|
+
expect(Weight.fromGrams(1_999).divide(factor).get()).toEqual(666);
|
|
36
|
+
});
|
|
37
|
+
test("equals", () => {
|
|
38
|
+
const a = Weight.fromGrams(1800);
|
|
39
|
+
const b = Weight.fromGrams(180);
|
|
40
|
+
expect(a.equals(a)).toEqual(true);
|
|
41
|
+
expect(a.equals(b)).toEqual(false);
|
|
42
|
+
});
|
|
43
|
+
test("greaterThan", () => {
|
|
44
|
+
const a = Weight.fromGrams(1800);
|
|
45
|
+
const b = Weight.fromGrams(180);
|
|
46
|
+
expect(a.greaterThan(a)).toEqual(false);
|
|
47
|
+
expect(a.greaterThan(b)).toEqual(true);
|
|
48
|
+
});
|
|
49
|
+
test("lessThan", () => {
|
|
50
|
+
const a = Weight.fromGrams(180);
|
|
51
|
+
const b = Weight.fromGrams(1800);
|
|
52
|
+
expect(a.lessThan(a)).toEqual(false);
|
|
53
|
+
expect(a.lessThan(b)).toEqual(true);
|
|
54
|
+
});
|
|
55
|
+
test("isZero", () => {
|
|
56
|
+
const a = Weight.fromGrams(10);
|
|
57
|
+
expect(Weight.zero().isZero()).toEqual(true);
|
|
58
|
+
expect(a.isZero()).toEqual(false);
|
|
59
|
+
});
|
|
60
|
+
test("toString", () => {
|
|
61
|
+
expect(Weight.fromGrams(1804).toString()).toEqual("1804 g");
|
|
62
|
+
});
|
|
63
|
+
test("toJSON", () => {
|
|
64
|
+
expect(Weight.fromGrams(1804).toJSON()).toEqual(1804);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
import { YearIsoId } from "../src/year-iso-id.vo";
|
|
4
|
+
describe("YearIsoId", () => {
|
|
5
|
+
test("happy path", () => {
|
|
6
|
+
const valid = ["0000", "1970", "1999", "2024", "2025", "9999"];
|
|
7
|
+
for (const year of valid) {
|
|
8
|
+
expect(v.safeParse(YearIsoId, year).success).toEqual(true);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
test("rejects non-string - null", () => {
|
|
12
|
+
expect(() => v.parse(YearIsoId, null)).toThrow("year.iso.id.type");
|
|
13
|
+
});
|
|
14
|
+
test("rejects non-string - number", () => {
|
|
15
|
+
expect(() => v.parse(YearIsoId, 123)).toThrow("year.iso.id.type");
|
|
16
|
+
});
|
|
17
|
+
test("rejects invalid year", () => {
|
|
18
|
+
expect(() => v.parse(YearIsoId, "202A")).toThrow("year.iso.id.bad.chars");
|
|
19
|
+
});
|
|
20
|
+
test("rejects 5 digits year", () => {
|
|
21
|
+
expect(() => v.parse(YearIsoId, "202A")).toThrow("year.iso.id.bad.chars");
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|