Represent externalised attachments as their own message
@davidjgoss ci sta già lavorando.
Dal 20/1/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
🤔 What's the problem you're trying to solve?
This is a product of a discussion in Discord, which I will attempt to summarize here.
I maintain a Cypress library whose goal is to implement the Cucumber experience in the Cypress domain. Cypress has an option to record videos in case of test failures, which is useful to put into reports - especially the HTML report, where they can be viewed inline.
A video can be large. A typical, naive message writer and a reader will both read attachments into memory, during writing and parsing, in leue of streaming based JSON writers/readers.
In Cypress, these videos appear on FS after a run, IE. they are already externalized.
We came to the conclussion that a pragmatic approach is to emit Attachment envelopes indicating an already externalized attachment, as compared to leaving the job of externalizing it up to the formatter.
The Attachment type on the other hand has a required body attribute. I propose to make it optional.
Personally, I enjoy union types in TS, something along the lines of Attachment = InlineAttachment | ExternalAttachment, which would leave little room to mix up body and url.
✨ What's your proposed solution?
Make the body attribute optional, possible even making the Attachment type a union type, as described above.
⛏ Have you considered any alternatives or workarounds?
I can forcefully work around TS and emit an Attachment without body, which the HTML formatter will happily accept and render correctly. However, it feels a bit hacky.
📚 Any additional context?
No response
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 3.4k
- Fork
- 676
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cucumber/common
-
Upgrade to TypeScript 7Forse di nuovo libera @davidjgoss l’ha presa 124 giorni fa e non c’è nessuna pull request aperta. Apertalanguage: javascript
-
Allowing both DocString and DataTable on a single stepForse di nuovo libera @mpkorstanje l’ha presa 129 giorni fa e non c’è nessuna pull request aperta. Aperta
cucumber/common#2315 · 23 commenti · 1 reazione · 1 assegnatario ·
-
Enable static analysisForse di nuovo libera @mpkorstanje l’ha presa 220 giorni fa e non c’è nessuna pull request aperta. Aperta
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100