NH_xunit

xUnit style testing.

To są wszystkie wersje tego skryptu. Pokaż tylko te wersje, gdzie kod został zmieniony.

  • v53 23-02-2024

    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.

    The equivalent is now handled in TestCase.run(), so this is never executed.

    Bump version number.

  • v52 08-02-2024

    Fix two cases where a global was accidentally being used.

    Issue #238.

    Bump version number.

  • v51 21-12-2023

    Consider xunit finished.

    There will probably always be more assertions and such, but all known current bugs, features and enhancements are addressed.

    Issue #172.

    Bump version number.

  • v50 19-12-2023

    Migrate asserts to using supported new constructs.

    Issue #183.

    Bump version number.

  • v49 17-12-2023

    Default to making assertion descriptions mandatory when more than 1.

    Issue #215.

    Bump version number.

  • v48 16-12-2023

    Do not double count assertions with assertRaises().

    Issue #215.

    Add descriptive text to some assertions.

    Issue #215.

    Finalize tunables for missing asserts.

    Issue #215.

    Bump version number.

  • v47 14-12-2023

    Add some assert descriptions.

    Issue #215.

    Tighten the limits for asserts sans descriptions.

    Issue #215.

    Bump version number.

  • v46 13-12-2023

    Add some issue numbers to some TODOs.

    Issue #183.

    Add some assert descriptions and expand tests to include content.

    Issues #183, #215.

    Bump version number.

  • v45 12-12-2023

    Add some descriptive text to asserts.

    This time, TestResultTestCase.testWasSuccessful().

    Issue #215.

    Bump version number.

  • v44 11-12-2023

    Add descriptive text to a bunch of asserts under test.

    Issue #215.

    Bump version number.

  • v43 10-12-2023

    Reword "inner assert" as "assert under test".

    Issue #215.

    Add descriptive text to a bunch of asserts under test.

    Issue #215.

    Bump version number.

  • v42 08-12-2023

    Add descriptive text to a bunch of asserts.

    Those tests for assertX() methods themselves were a surprise.

    Issue #215.

    Bump version number.

  • v41 05-12-2023

    Add a bunch of descriptions to assertX() methods.

    Issue #215.

    Crank down the missing asserts alert and tweak failure message.

    Issue #215.

    Bump version number.

  • v40 04-12-2023

    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.

    Issue #215.

    Bump version number.

  • v39 03-12-2023

    Improve output of equalArray() error messages.

    This is now in line with the equal{Map,Set}() implementations.

    Issue #183.

    Bump version number.

  • v38 02-12-2023

    Normalize maps and sets into strings before comparing.

    A bit surprised by how nicely this worked.

    Issue #183.

    Bump version number.

  • v37 01-12-2023

    JSDoc: Minor grammar tweak.

    Document that order is ignored for some tests.

    Issue #183.

    Document a bug that we need to fix in equalMap().

    Issue #183.

    Implement TestCase.equalSet().

    Rough, but a start.

    Issue #183.

    Bump version number.

  • v36 29-11-2023

    JSDoc: Update parameter types for recently added methods.

    Issue #183.

    Implement TestCase.equalObject().

    Issue #183.

    Bump version number.

  • v34 28-11-2023

    JSDoc: Improve precision.

    Issue #183.

    Improved reprMap() and reprSet().

    Issue #183.

    Bump version number.

  • v35 28-11-2023 Imported from URL
  • v34 27-11-2023

    JSDoc: Improve precision.

    Issue #183.

    Improved reprMap() and reprSet().

    Issue #183.

    Bump version number.

  • v33 26-11-2023

    Improved reprObject().

    Issue #183.

    Implement TestCase.assertNoRaises().

    Also includes an example of updating an existing test method to use it.

    Issue #211.

    Bump version number.

  • v32 25-11-2023

    Add descriptive text to testAssert{True,False}()

    Issue #183.

    Bump version number.

  • v31 24-11-2023

    Initial implementations of repr{Object,Map,Set}().

    Backwards compatible in output, just delegating to different methods now.

    Issue #183.

    Remove a Test prefix from a TestCase.

    Bump version number.

  • v30 23-11-2023

    Improved reprArray().

    Issue #183.

    Bump version number.

  • v29 22-11-2023

    Move testing reprString() into its own method.

    Issue #183.

    eslint: Deal with some upcoming tweaks to newline-per-chained-call.

    Issue #203.

    Bump version number.

  • v28 20-11-2023

    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.

    Issue #183.

    Bump version number.

  • v27 19-11-2023

    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.

    Issue #183.

    Bump version number.

  • v26 18-11-2023

    Add tests against using String() and not just the primitive.

    Issue #183.

    Bump version number.

  • v25 17-11-2023

    Remove funcs field from xunit.testing.

    No longer used.

    Issue #179.

    JSDoc: Update reprArray.

    Issue #183.

    Initial implementation of reprString().

    Still backwards compatible. Will fix that in the next change.

    Issue #183.

    Bump version number.

  • v24 16-11-2023

    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.

    Issue #183.

    Bump version number.

  • v23 15-11-2023

    Implement TestResult.summary().

    Issue #200.

    Bump version number.

  • v22 14-11-2023

    JSDoc: Update name of the referenced TestCase.

    Issue #172.

    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.

    Issue #172.

    Capture more information about tests in TestResult.

    Issue #200.

    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()).

    Issue #183.

    Bump version number.

  • v21 13-11-2023

    JSDoc: Wrap method in markdown asterisks.

    Issue #183.

    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.

    Issue #183.

    Bump version number.

  • v20 12-11-2023

    Write test to verify TestRunner accumulates results correctly.

    This should round out everything we need to do for TestRunner.

    Issue #172.

    Typo and grammar improvements.

    Issue #172.

    JSDoc: Improve description of how to use TestCase.

    Issue #172.

    Implement TestCase.equalValueOf().

    Also have a way to change the fallback equalX() function.

    Issue #183.

    Bump version number.

  • v19 10-11-2023

    Write test to verify TestRunner finds test methods correctly.

    Issue #172.

    Implement TestCase.equalArray().

    This also allows for fixing up a couple of tests that not longer need to wrap with JSON.stringify().

    Issue #183.

    Implement TestCase.assertRegExp().

    Issue #172.

    Improve documentation surrounding the msg parameter in asserts.

    Issue #172.

    Bump version number.

  • v18 09-11-2023

    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.

    Issue #183.

    Rename #doClassCleanups() for consistency.

    Issue #172.

    Move some test classes into the test method that uses them.

    Issue #172.

    Add tests for TestRunner.doClassCleanups().

    Issue #172.

    Give some assertions a message parameter.

    This makes it easier to since we cannot reliable grab line numbers.

    Issue #183.

    Bump version number.

  • v17 08-11-2023

    Implement getType().

    This will help us choose a comparator function.

    Issue #183.

    Bump version numbers.

  • v16 07-11-2023

    Factor out common code from assert{,Not}Equal().

    Giving a hint towards future work.

    Issue #183.

    Bump version numbers.

  • v15 06-11-2023

    Change the error message in TestCase.assertEqual().

    Issue #183.

    Implement 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.

    Issue #183.

    Bump version numbers.

  • v14 05-11-2023

    Make test failure messages more robust against strange types.

    Issue #172.

    Bump version numbers.

  • v14 05-11-2023

    Make test failure messages more robust against strange types.

    Issue #172.

    Bump version numbers.

  • v13 04-11-2023

    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.

    Issue #186.

    Check result.

    Issue #186.

    Make sure that skips and fails in cleanups count as errors.

    Issue #186.

    Bump version numbers.

  • v12 03-11-2023

    Move TestResult back above TestCase.

    Upcoming changes will need this. The TestResultTestCase stays put.

    Issue #172.

    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().

    Issue #186.

    style-nudge: Right place properties in TestCase.

    Issue #173.

    Bump version numbers.

  • v11 02-11-2023

    Have the msg = '' arguments append to, not replace error messages.

    Issue #172.

    Create a TestCase.id property.

    Issue #172.

    Bump version numbers.

  • v10 01-11-2023

    More tests for TestRunner.

    Issue #172.

    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.

    Issue #183.

    Bump version numbers.

  • v9 31-10-2023

    Throw TypeError when passing in a bad test class.

    Issue #172.

    Do NOT run test methods if setUpClass has problems or skips.

    Issue #172.

    Add a single test for TestRunner.

    There are lots to do, but exposing bugs and features not yet implemented.

    Issue #172.

    Bump version numbers.

  • v8 30-10-2023

    Implement TestCase.assertTrue() and TestCase.assertFalse().

    Issue #172.

    Sort the eslint-disable directives and rename the test class.

    Issue #172.

    Add tests for TestResult.

    Issue #172.

    Prep test class for TestRunner.

    Issue #172.

    Bump version numbers.

  • v7 29-10-2023

    Tests for assertEqual, assertRaises, and assertRaisesRegExp.

    This catches up on tests for TestCase.

    Issue #172.

    Remove noisy JSDoc for test methods.

    The names are usually sufficient.

    Issue #172.

    Bump version numbers.

  • v6 28-10-2023

    Improve documentation about BasicFeaturesTestCase.

    Issue #172.

    Implement 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.

    Issue #172.

    Tests for TestCase.skip() and TestCase.fail().

    Issue #172.

    Bump version numbers.

Pokaż wszystkie wersje skryptu