Page MenuHomePhabricator

Executor unit tests (chai) asserts have arguments in the wrong order
Closed, ResolvedPublic

Description

Description

Chai asserts should be assert( actual, expected ), but we do assert( expected, actual ), which becomes confusing when debugging tests.

Docs: https://www.chaijs.com/api/assert/#method_deepequal

Example: https://gitlab.wikimedia.org/repos/abstract-wiki/wikifunctions/function-evaluator/-/blob/main/executors/javascript-wasmedge/test/executor.js?ref_type=heads#L46


Completion checklist

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Switch actual and expected in JS chai test assertions.repos/abstract-wiki/wikifunctions/function-evaluator!622apineapine-test-ordermain
Customize query in GitLab

Event Timeline

cmassaro subscribed.
gengh removed cmassaro as the assignee of this task.

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

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2026-07-27-212343 to 2026-08-04-215640

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

Change #1321556 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2026-07-27-212343 to 2026-08-04-215640

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