In PrettyHtmlExtensions.cs, expectedCompare is assigned from actual instead of expected:
var actualCompare = actual.Replace("\t", string.Empty);
var expectedCompare = actual.Replace("\t", string.Empty); // should be `expected`
This means the contains check on line 88 is actual.Contains(actual), which always passes. Any test using ShouldContainHtml silently passes regardless of output.
Many test assertions across the test suite use this helper.
Found while investigating #3324, where the MagicCallOutWithFormatting test passes despite the callout parser rejecting its input.
In
PrettyHtmlExtensions.cs,expectedCompareis assigned fromactualinstead ofexpected:This means the contains check on line 88 is
actual.Contains(actual), which always passes. Any test usingShouldContainHtmlsilently passes regardless of output.Many test assertions across the test suite use this helper.
Found while investigating #3324, where the
MagicCallOutWithFormattingtest passes despite the callout parser rejecting its input.