Fix: tests

This commit is contained in:
Pieter Vander Vennet 2024-10-13 12:32:54 +02:00
parent 15176a1682
commit c95999b50b

View file

@ -860,12 +860,12 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
* // should handle special case with a translated parameter
* const spec = {"special": {"type":"image_upload", "label": {"en": "Add a picture to this object", "nl": "Voeg een afbeelding toe"}}}
* const r = RewriteSpecial.convertIfNeeded(spec, ConversionContext.test())
* r // => {"en": "{image_upload(,Add a picture to this object)}", "nl": "{image_upload(,Voeg een afbeelding toe)}" }
* r // => {"en": "{image_upload(,Add a picture to this object,)}", "nl": "{image_upload(,Voeg een afbeelding toe,)}" }
*
* // should handle special case with a prefix and postfix
* const spec = {"special": {"type":"image_upload" }, before: {"en": "PREFIX "}, after: {"en": " POSTFIX", nl: " Achtervoegsel"} }
* const r = RewriteSpecial.convertIfNeeded(spec, ConversionContext.test())
* r // => {"en": "PREFIX {image_upload(,)} POSTFIX", "nl": "PREFIX {image_upload(,)} Achtervoegsel" }
* r // => {"en": "PREFIX {image_upload(,,)} POSTFIX", "nl": "PREFIX {image_upload(,,)} Achtervoegsel" }
*
* // should warn for unexpected keys
* const context = ConversionContext.test()