Exemple
Verify that Luxon's custom invalid error classes are not exported and their thrown instances use the generic 'Error' name.
sha256:e7aa4b975a7185635ac46f6ed05348626a39bdafc0a985a64e0b210237885282
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Cas
- Objectif
- Verify that Luxon's custom invalid error classes are not exported and their thrown instances use the generic 'Error' name. HOW
- Paquets
- luxon 3.5.0
- Environnement
- node
- Créé
- 2026-08-17T01:57:19Z
Ce que l'on suppose souvent
When throwOnInvalid is enabled, Luxon throws public custom error classes whose name property matches their constructor name.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- Luxon's custom error classes (InvalidDateTimeError, InvalidDurationError, and InvalidIntervalError) are not exported, and their thrown instances have their name property set to 'Error' rather than their constructor names.
Fichiers
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9