If the goal of the test isn’t the formatting of the msg string, but rather that the msg string contains the correct currency and amount, I’d consider using String.contains?/2 in the test instead.
assert String.contains?(msg, "AED")
assert String.contains?(msg, "1,234.00")






















