Page MenuHomePhabricator

[Technical] Add Jest tests for TOC before/after edit
Closed, ResolvedPublic3 Estimated Story Points

Description

In T307251 a new workflow was added to update the table of contents after an edit. Tests are an important part of this feature, as it will seldom be used during manual testing so we should strive to have test coverage for the feature.

Acceptance criteria

Event Timeline

Jdlrobson lowered the priority of this task from High to Low.Sep 6 2022, 5:27 PM

@nray Please add me in the loop for this task I want to learn the jest unit testing and how we do it

@Mabualruz No worries, I'll let you know when I'm deep into the jest stuff!

Change 831636 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Remove unreachable code in tableOfContents.js

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

Change 832283 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/skins/Vector@master] Add Jest tests for TOC before/after edit

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

nray subscribed.

Change 831636 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove unreachable code in tableOfContents.js

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

Since this work only added tests/removed code that wasn't being used, I'm assuming it can skip qa

nray added a subscriber: Edtadros.

Change 832283 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Add Jest tests for TOC before/after edit

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