diff options
| author | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-10-27 12:15:34 +0100 |
|---|---|---|
| committer | Tobias Järvelöv <tobias.jarvelov@mullvad.net> | 2025-10-27 15:36:50 +0100 |
| commit | 333f00150b78d929faa94d70ca689d3fde2d7e44 (patch) | |
| tree | 16aae3fdf456a9303a3cb9fd5ad7dee4fdfc7fd2 | |
| parent | 51fdf7174e893b980f72929e55c7013430cd7f57 (diff) | |
| download | mullvadvpn-333f00150b78d929faa94d70ca689d3fde2d7e44.tar.xz mullvadvpn-333f00150b78d929faa94d70ca689d3fde2d7e44.zip | |
Add test to ensure output is produced reliably on each call
| -rw-r--r-- | desktop/packages/mullvad-vpn/test/unit/html-formatter.spec.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/packages/mullvad-vpn/test/unit/html-formatter.spec.ts b/desktop/packages/mullvad-vpn/test/unit/html-formatter.spec.ts index 54fa5f9a24..d13343f1d4 100644 --- a/desktop/packages/mullvad-vpn/test/unit/html-formatter.spec.ts +++ b/desktop/packages/mullvad-vpn/test/unit/html-formatter.spec.ts @@ -22,6 +22,12 @@ describe('Format html', () => { ' text', ]); }); + it('should produce reliable output on each call', () => { + expectChildrenToMatch(formatHtml('<b>Some</b> bold text'), ['Some', ' bold text']); + expectChildrenToMatch(formatHtml('Some non bold text'), ['Some non bold text']); + // Same string used as in first expectChildrenToMatch call + expectChildrenToMatch(formatHtml('<b>Some</b> bold text'), ['Some', ' bold text']); + }); it('should format middle emphasis tag', () => { expectChildrenToMatch(formatHtml('Some <em>emphasized</em> text'), [ 'Some ', |
