Greasy Fork is available in English.
xUnit style testing.
Ceci est la version du script où le code a été mise à jour. Présenter toutes les versions.
Stop using name as an identifier as it shadows a global.
This change addresses local variable.
Issue #238.
␄
Clean up some obsolete code from TestRunner.
TestRunner
The equivalent is now handled in TestCase.run(), so this is never executed.
TestCase.run()
Bump version number.
Fix two cases where a global was accidentally being used.
Consider xunit finished.
There will probably always be more assertions and such, but all known current bugs, features and enhancements are addressed.
Issue #172.
Migrate asserts to using supported new constructs.
Issue #183.
Default to making assertion descriptions mandatory when more than 1.
Issue #215.
Do not double count assertions with assertRaises().
Add descriptive text to some assertions.
Finalize tunables for missing asserts.
Add some assert descriptions.
Tighten the limits for asserts sans descriptions.
Add some issue numbers to some TODOs.
Add some assert descriptions and expand tests to include content.
Issues #183, #215.
Add some descriptive text to asserts.
This time, TestResultTestCase.testWasSuccessful().
TestResultTestCase.testWasSuccessful()
Add descriptive text to a bunch of asserts under test.
Reword "inner assert" as "assert under test".
Add descriptive text to a bunch of asserts.
Those tests for assertX() methods themselves were a surprise.
Add a bunch of descriptions to assertX() methods.
Crank down the missing asserts alert and tweak failure message.
Implement a warning if many assertions are called without messages.
Currently there are a 35 test methods that would trigger this with the desired configuration. So currently tuned to allow a focused burn down list.
Interestingly, most of them are in TestCaseTestCase itself.
TestCaseTestCase
Improve output of equalArray() error messages.
This is now in line with the equal{Map,Set}() implementations.
Normalize maps and sets into strings before comparing.
A bit surprised by how nicely this worked.
JSDoc: Minor grammar tweak.
Document that order is ignored for some tests.
Document a bug that we need to fix in equalMap().
Implement TestCase.equalSet().
TestCase.equalSet()
Rough, but a start.
JSDoc: Update parameter types for recently added methods.
Implement TestCase.equalObject().
TestCase.equalObject()
JSDoc: Improve precision.
Improved reprMap() and reprSet().
Improved reprObject().
Implement TestCase.assertNoRaises().
TestCase.assertNoRaises()
Also includes an example of updating an existing test method to use it.
Issue #211.
Add descriptive text to testAssert{True,False}()
Initial implementations of repr{Object,Map,Set}().
Backwards compatible in output, just delegating to different methods now.
Remove a Test prefix from a TestCase.
Test
TestCase
Improved reprArray().
Move testing reprString() into its own method.
eslint: Deal with some upcoming tweaks to newline-per-chained-call.
newline-per-chained-call
Issue #203.
Wrap strings in double quotes in test assertion failure messages.
This helps differentiate between things like 0 vs '0' in messages. It is also in line with what Python's assertions and JSON.stringify() does.
Update testing documentation.
Issue #179.
Tweak some failure messages/details.
It can be tricky telling apart the failures when testing assertX() and equalX() functions. This additional whitespace and identifying characters helps a bit.
Add tests against using String() and not just the primitive.
Remove funcs field from xunit.testing.
No longer used.
JSDoc: Update reprArray.
Initial implementation of reprString().
Still backwards compatible. Will fix that in the next change.
Add descriptive text to many test methods with multiple assertions.
It turns out that tweaking the error messages is a little harder than anticipated, so more detail about which assertion failed is handy.
Implement TestResult.summary().
TestResult.summary()
Issue #200.
JSDoc: Update name of the referenced TestCase.
Normalize breaking out of method name.
Even though this particular one will fit on the line without wrapping, it does look out of place compared to the subsequent tests.
Capture more information about tests in TestResult.
TestResult
Run #failMsgs() messages through String() rather than repr().
There will be an upcoming change which results is double wrapping. However, we still need to protect against random stuff in messages (like Symbol()).
Symbol()
JSDoc: Wrap method in markdown asterisks.
Create repr() and {add,get}ReprFunc() and plug in.
Also created reprArray(), though it does the same thing as before.
With this change, there are no differences, just a framework and initial implementation.
Write test to verify TestRunner accumulates results correctly.
This should round out everything we need to do for TestRunner.
Typo and grammar improvements.
JSDoc: Improve description of how to use TestCase.
Implement TestCase.equalValueOf().
TestCase.equalValueOf()
Also have a way to change the fallback equalX() function.
Write test to verify TestRunner finds test methods correctly.
Implement TestCase.equalArray().
TestCase.equalArray()
This also allows for fixing up a couple of tests that not longer need to wrap with JSON.stringify().
Implement TestCase.assertRegExp().
TestCase.assertRegExp()
Improve documentation surrounding the msg parameter in asserts.
Create {add,get}EqualFunc() and plug into assert{Not,}Equal().
This includes reworking #testPrimitives() into equalEqEqEq() and the creation of equalString() to show how to create type specific comparators.
Rename #doClassCleanups() for consistency.
Move some test classes into the test method that uses them.
Add tests for TestRunner.doClassCleanups().
TestRunner.doClassCleanups()
Give some assertions a message parameter.
This makes it easier to since we cannot reliable grab line numbers.
Implement getType().
This will help us choose a comparator function.
Bump version numbers.
Factor out common code from assert{,Not}Equal().
Giving a hint towards future work.
Change the error message in TestCase.assertEqual().
TestCase.assertEqual()
Implement TestCase.assertNotEqual().
TestCase.assertNotEqual()
Some of the tests are surprising. For example {} !== {} and [] !== []. That is just the way JavaScript is implemented.
{} !== {}
[] !== []
Also, why this bug exists: To make it possible to make those comparisons in tests.
Make test failure messages more robust against strange types.
style-nudge: Right place properties in TestResult.
Also reorder a method to match the new order of the properties.
Issue #173.
Use localResult in the body of TestCase.run().
Issue #186.
Actually run doCleanups().
Also test using the new run() mechanism.
Check result.
Make sure that skips and fails in cleanups count as errors.
Move TestResult back above TestCase.
Upcoming changes will need this. The TestResultTestCase stays put.
TestResultTestCase
Move test method execution out of TestRunner into TestCase.
This allows running a test without using a TestRunner.
Subsequent changes will update TestCaseTestCase to use this approach rather than calling methods directly.
This is equivalent to the previous code, however, it turns out that has a bit problem: it did not run doCleanups().
style-nudge: Right place properties in TestCase.
Have the msg = '' arguments append to, not replace error messages.
Create a TestCase.id property.
TestCase.id
More tests for TestRunner.
Explicitly test assertEqual() on all primitives.
This exposed some issues with the failure message. It still has issues, but does not crash with these examples.
Throw TypeError when passing in a bad test class.
TypeError
Do NOT run test methods if setUpClass has problems or skips.
Add a single test for TestRunner.
There are lots to do, but exposing bugs and features not yet implemented.
Implement TestCase.assertTrue() and TestCase.assertFalse().
TestCase.assertTrue()
TestCase.assertFalse()
Sort the eslint-disable directives and rename the test class.
Add tests for TestResult.
Prep test class for TestRunner.
Tests for assertEqual, assertRaises, and assertRaisesRegExp.
This catches up on tests for TestCase.
Remove noisy JSDoc for test methods.
The names are usually sufficient.
Improve documentation about BasicFeaturesTestCase.
BasicFeaturesTestCase
Implement TestCase.assertRaisesRegExp().
TestCase.assertRaisesRegExp()
This different from Python's unittest name, assertRaisesRegex, because in JS-land, the preference seems to be RegExp.
Also, rewrite assertRaises() in terms of this function.
Tests for TestCase.skip() and TestCase.fail().
TestCase.skip()
TestCase.fail()
Implement TestCase.doCleanups().
TestCase.doCleanups()
Afficher toutes les versions de script