Tests: add testcase

This commit is contained in:
Pieter Vander Vennet 2025-03-08 00:03:30 +01:00
parent 9254b95237
commit 5281bcda27

View file

@ -5,10 +5,7 @@ import { TagUtils } from "../../Logic/Tags/TagUtils"
import { And } from "../../Logic/Tags/And"
import { Utils } from "../../Utils"
import { Tag } from "../../Logic/Tags/Tag"
import {
MappingConfigJson,
QuestionableTagRenderingConfigJson,
} from "./Json/QuestionableTagRenderingConfigJson"
import { MappingConfigJson, QuestionableTagRenderingConfigJson } from "./Json/QuestionableTagRenderingConfigJson"
import Validators, { ValidatorType } from "../../UI/InputElement/Validators"
import { TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
import { RegexTag } from "../../Logic/Tags/RegexTag"
@ -572,6 +569,9 @@ export default class TagRenderingConfig {
* Gets the correct rendering value (or undefined if not known)
* Not compatible with multiAnswer - use GetRenderValueS instead in that case
* @constructor
*
* const tr = new TagRenderingConfig({question: "q", render: "{charge}", freeform: {key: "charge", postfixDistinguished: "condom"} })
* tr.GetRenderValueWithImage({charge: "€2/condom"}).then.textFor("en") // => "€2"
*/
public GetRenderValueWithImage(
tags: Record<string, string>