Page MenuHomePhabricator

function-schemata: In many QUnit tests, the arg expected and actual are swapped around
Closed, ResolvedPublic

Description

Phpunit tests assert statements put expected value first and actual value next, while QUnit assert methods do the opposite, first is actual and then expected. (https://api.qunitjs.com/assert/deepEqual/)

Currently in function-schemata tests (QUnit) we are putting the expected value before the actual. This doesn't mess up the tests, but when failures happen, the actual and expected values shown in console are interchanged which makes people go sad when trying to figure out what's happening.

Event Timeline

Change 885803 had a related patch set uploaded (by Cory Massaro; author: Cory Massaro):

[mediawiki/services/function-schemata@master] Ensure that all applicable QUnit tests supply actual value before expected value.

https://gerrit.wikimedia.org/r/885803

Change 885803 merged by jenkins-bot:

[mediawiki/services/function-schemata@master] Ensure that all applicable QUnit tests supply actual value before expected value.

https://gerrit.wikimedia.org/r/885803

Change 886071 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886071

Change 886072 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886072

Change 886073 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886073

Change 886075 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886075

Change 886124 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886124

Change 886073 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886073

Change 886071 merged by jenkins-bot:

[mediawiki/tools/wikilambda-cli@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886071

Change 886124 merged by jenkins-bot:

[mediawiki/services/function-orchestrator@master] Update function-schemata sub-module to HEAD (88f1588)

https://gerrit.wikimedia.org/r/886124

Change 886072 merged by Jforrester:

[mediawiki/services/function-evaluator@master] Update function-schemata sub-module to HEAD (b193f0c)

https://gerrit.wikimedia.org/r/886072