Module talk:UnitTests: Difference between revisions

Content deleted Content added
Present failed tests together at the top: Many thanks again 😊 I know what you mean; I love coding too. I hoping one day to be good at it 😉 ~~~~
m updating name of Module:Annotated link since move
Line 81:
== Tests not failing when they should ==
 
I'm creating testcases for [[Module:GetShortDescription]] and [[Module:AnnotatedLinkAnnotated link]] and due to my own derping, left some copy-pasta typos which should have caused a series of tests to fail, but they did not. I fixed the typos but [[Special:Diff/1135864158/1135864279|purposefully altered one test to fail]] and it sailed through running <code><nowiki>{{#invoke:AnnotatedLink/testcases|run_tests}}</nowiki></code>. Am I doing something wrong, or is there a problem with this module? <code style="background:#DFF;white-space:pre">[[User:Fred Gandt|Fred Gandt]] · [[User talk:Fred Gandt|talk]] · [[Special:Contributions/Fred Gandt|contribs]]</code> 09:42, 27 January 2023 (UTC)
:"Test methods like test_hello above must begin with 'test'". I knew that. <code style="background:#DFF;white-space:pre">[[User:Fred Gandt|Fred Gandt]] · [[User talk:Fred Gandt|talk]] · [[Special:Contributions/Fred Gandt|contribs]]</code> 09:45, 27 January 2023 (UTC)
:Might I suggest not outputting "All tests passed." when no tests have been run? <code style="background:#DFF;white-space:pre">[[User:Fred Gandt|Fred Gandt]] · [[User talk:Fred Gandt|talk]] · [[Special:Contributions/Fred Gandt|contribs]]</code> 11:18, 27 January 2023 (UTC)