Releases: standardhealth/shr-test-helpers
6.0.0
Version 6.0.0 introduces support for the new CIMPL 6.0 grammar. The two most significant changes to the models are:
- Replaced
code
,Coding
, andCodeableConcept
with newconcept
primitive - Removed
RefValue
in favor of using a field's "entry-ness" to determine if it should be a reference
6.0.0 Beta 2
Version 6.0.0 Beta 2 merely bumps up its dependency on shr-models to 6.0.0-beta.2.
6.0.0 Beta 1
Initial support for the new CIMPL 6.0 grammar. The two most significant changes to the model are:
- Replaced
code
,Coding
, andCodeableConcept
with newconcept
primitive - Removed
RefValue
in favor of using a field's "entry-ness" to determine if it should be a reference
5.2.2
5.2.1
5.2.0
Version 5.2.0 some bugs in the setup of existing tests, adds new tests, and adds two new features:
- Write the actual results to a specified folder. This can be helpful when debugging failing tests.
- Auto-fix broken tests by overwriting the broken fixture with the actual result. This is helpful when tests are expected to be broken due to new features / changes, and you want to update the fixtures to represent the new output.
The commonExportTests
function now takes the following parameters:
exportSpecifications
: a function that expects a single argument (the specifications) and returns the results of the exporter being testedimportFixture
: a function that expects one or two arguments (the name of a test case, and optionally a file extension) and returns an expected test fixtureimportErrorsFixture
: a function that expects one or two arguments (the name of a test case, and optionally a file extension) and returns an expected errors test fixture (or an empty array for no errors)fix
: (new) a function expecting three arguments (the test case name, the actual results, and the actual errors array). This function will be invoked if tests are run with environment variableFIX_TEST_ERRORS
set totrue
and should use the passed in actuals to modify the test fixtures.actualsFolder
: (new) Optional argument which, if specified, indicates where to dump the actual results of test cases.
To support auto-fixing, projects using shr-test-helpers should add this script declaration to their package.json:
"test:fix": "FIX_TEST_ERRORS=true ./node_modules/.bin/mocha --reporter spec --recursive",
Note that because some existing tests were updated (to fix real problems in the tests), some existing projects may fail when running against this new version. It's recommended that projects only upgrade to this version after testing and fixing any discrepancies.
5.1.3
5.1.2
5.1.1
Version 5.1.1 contains the following changes:
shr-models
,bunyan
, andchai
are now peer dependencies and should be provided by the libraries invoking the shr-test-helpers.AssertionError
's thrown while loading a test fixture will now cause the test to fail.- New tests have been added.
- Existing tests have been modified to remove now-invalid structures (like field choices and choice options with cardinalities other than
1..1
).
5.1.0
Version 5.1.0 adds new tests used by shr-json-export and removes components of old tests that are no longer valid (e.g., choice fields, non 1..1 option cardinalities, etc). Because of the latter changes, this may cause existing tests in other exporters to fail.