standardhealth / shr-es6-export

ES6 library for exporting SHR models to ES6 classes
Apache License 2.0
3 stars 0 forks source link

Support includes type paths #36

Closed cmoesel closed 5 years ago

cmoesel commented 5 years ago

Fixes ES6 exporter to support proper resolution of mappings that use identifiers from IncludesType constraints. See: standardhealth/shr-cli#150

This was implemented test-first, so I verified that the new unit test failed (as expected) before the fix, and it now passes.

You can also verify on your own against the dev branch of shr_spec:

$ node . ../shr_spec/spec

Before the this fix (e.g., shr-cli v5.15.0), there are 181 errors reported by shr-es6-export. After this fix, there are 0 errors.

This PR also increases test timeouts from the default (2s) to 5s, since I had cases where sometimes the test setup took longer than 2 seconds (and then failed due to timeout).