mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 22:19:48 +00:00
Earlier, the tests for compose formatting were verbose, hard to read as well as extend, and overly granular, without even having the ability to test the final text selection or the cursor position. Now, new test helpers, `init_textarea_state` and `get_textarea_state`, have been added, enabling the tests to be more concise and readable, while also being more powerful. A representative string alone now describes the textarea state (the text and the selection / cursor), making each test case as easy as defining the initial state as a string and comparing the expected state post formatting with another string. These new tests helped surface a couple bugs which have been fixed in preceding commits.
44 KiB
44 KiB