Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark "todo" tests as skipped #261

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

maaarghk
Copy link

@maaarghk maaarghk commented Oct 6, 2023

fix #242

message attr is used to differentiate these from it.skip but I don't think it makes a difference; this output matches what I expect from using mocha-junit-exporter previously

"numPendingTestSuites": 0,
"numPendingTests": 0,
"numRuntimeErrorTestSuites": 0,
"numTodoTests": 1,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this always comes out set to 0 - if so I think the rest of the .json files should be updated to reflect this ...

@@ -226,7 +236,7 @@ module.exports = function (report, appDirectory, options, rootDir = null) {
name: replaceVars(suiteOptions.suiteNameTemplate, suiteNameVariables),
errors: suiteErrors,
failures: suite.numFailingTests,
skipped: suite.numPendingTests,
skipped: suite.numPendingTests + (suite.numTodoTests ? suite.numTodoTests : 0),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and the numTodoTests ? numTodoTests : 0 in this file updated to just numTodoTests.

But, if numTodoTests only comes out after a certain Jest version, and it would entail bumping them minimum compatible version of jest in this library's package.json, then I suppose it's fine to leave the test harness and this line as-is.

Anyone know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Mark 'todo' tests as 'skipped'
1 participant