Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Releases: standardhealth/shr-test-helpers

6.0.0

06 Jun 13:11
03ff81e
Compare
Choose a tag to compare

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, and CodeableConcept with new concept 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

04 Jun 03:42
Compare
Choose a tag to compare
6.0.0 Beta 2 Pre-release
Pre-release

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

30 May 02:53
Compare
Choose a tag to compare
6.0.0 Beta 1 Pre-release
Pre-release

Initial support for the new CIMPL 6.0 grammar. The two most significant changes to the model are:

  • Replaced code, Coding, and CodeableConcept with new concept primitive
  • Removed RefValue in favor of using a field's "entry-ness" to determine if it should be a reference

5.2.2

31 Aug 13:23
ab22c4d
Compare
Choose a tag to compare

Version 5.2.2 fixes a mistake made in the last version by removing shr-models as a concrete dependency and keeping it as only a peer dependency.

5.2.1

31 Aug 13:07
14b9443
Compare
Choose a tag to compare

Version 5.2.1 updates the dependency on shr-models to ^5.5.3.

5.2.0

11 Apr 14:38
e8ac9b1
Compare
Choose a tag to compare

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 tested
  • importFixture: a function that expects one or two arguments (the name of a test case, and optionally a file extension) and returns an expected test fixture
  • importErrorsFixture: 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 variable FIX_TEST_ERRORS set to true 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

23 Feb 16:39
dc4601f
Compare
Choose a tag to compare

Version 5.1.3 adds bunyan and chai to devDependencies. This allows individual module's unit tests to still work when that module is yarn-linked.

5.1.2

11 Jan 22:38
5e66caa
Compare
Choose a tag to compare

Version 5.1.2 adds a new test for type constraints on references.

5.1.1

07 Dec 14:24
7d50992
Compare
Choose a tag to compare

Version 5.1.1 contains the following changes:

  • shr-models, bunyan, and chai 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

05 Dec 20:23
e9e563b
Compare
Choose a tag to compare

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.