Opened 11 years ago
Closed 11 years ago
#25784 closed enhancement (fixed)
shortcode.js needs unit tests
Reported by: | iandunn | Owned by: | |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | Unit Tests | Keywords: | has-patch |
Focuses: | Cc: |
Description
Part of the ongoing effort to increase test coverage.
Attachments (2)
Change History (6)
#3
in reply to:
↑ 1
@
11 years ago
Replying to jorbin:
I cleaned the file up a bit based on our new jshnit standards (which were added after your initial patch).
Awesome, thanks :)
I also divided the assertions up a bit more. I think it's better to have more tests with a few direct assertions than tests with a lot of assertions. It makes it much easier to track down specific regressions.
Yeah, outside of Core I'm used to limiting each function to a single assertion, but on another ticket Sergey recommended grouping them. I think I probably grouped them a bit too much, though, so I like your version better.
Note: See
TracTickets for help on using
tickets.
Great start Iandunn!
I cleaned the file up a bit based on our new jshnit standards (which were added after your initial patch).
I also divided the assertions up a bit more. I think it's better to have more tests with a few direct assertions than tests with a lot of assertions. It makes it much easier to track down specific regressions.