I had the use case of a test being properly implemented but the feature code being incomplete and failing. When running the tests with the QUnit web interface, the test is not erroring out and is properly labeled todo.
However when running karma, the test is wrongfully reported as failing:
SUMMARY:
✖ 1 test failed
FAILED TESTS:
ext.graph.visualEditor
✖ ve.ui.TableWidget
Chrome 66.0.3359 (Linux 0.0.0)
Died on test #4 at
....
TypeError: Cannot read property '0' of undefined
at VeUiTableWidget.ve.ui.TableWidget.onInsertColumn // expected failure
...
at runTest (node_modules/qunit/qunit/qunit.js:1530:30)
at Test.run (node_modules/qunit/qunit/qunit.js:1516:6)
at node_modules/qunit/qunit/qunit.js:1728:12
at advanceTaskQueue (node_modules/qunit/qunit/qunit.js:1129:6)
at advance (node_modules/qunit/qunit/qunit.js:1110:4)
In lib/adapter.js I adjusted runner.testDone to print the test and testResult to the console which yields:
The testResult is set by runner.log which mark it with success = false. However in runner.testDone, the todo flag should be used to invert the result. Potentially:
From a discussion I had with @Krinkle , it is left to determine whether QUnit itself should handle the todo flag and flip the success or whether it should be handled by the reporter.
I had the use case of a test being properly implemented but the feature code being incomplete and failing. When running the tests with the QUnit web interface, the test is not erroring out and is properly labeled
todo
.However when running karma, the test is wrongfully reported as failing:
In
lib/adapter.js
I adjustedrunner.testDone
to print thetest
andtestResult
to the console which yields:The testResult is set by runner.log which mark it with
success = false
. However in runner.testDone, thetodo
flag should be used to invert the result. Potentially:Environment: