Skip to content

Commit

Permalink
render test: Use representative realm value for messageTypingAsHtml.
Browse files Browse the repository at this point in the history
It looks like this was trying to test that the sequence `&<` gets
escaped correctly. But we're already testing that for the user's
`email` and `avatar_url`, and I don't think we expect a realm URL to
contain that sequence.

When we start making `getFullUrl` use the URL constructor in an
upcoming commit, this test would have thrown an invalid URL error.
At that commit, we'll be sure to test manually, noting any invalid
URL errors we see at runtime, and address them.
  • Loading branch information
chrisbobbe committed Sep 16, 2020
1 parent affc920 commit 10622c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webview/html/__tests__/render-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ describe('typing', () => {
email: `${name}@example.com`,
};

expect(messageTypingAsHtml('&<r', [user])).not.toContain('&<');
expect(messageTypingAsHtml(eg.realm, [user])).not.toContain('&<');
});
});

0 comments on commit 10622c6

Please sign in to comment.