Update Spec Tests and Fix Newly Found Issues#348
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #348 +/- ##
==========================================
+ Coverage 87.40% 87.47% +0.06%
==========================================
Files 52 52
Lines 4558 4566 +8
Branches 1288 1291 +3
==========================================
+ Hits 3984 3994 +10
+ Misses 361 358 -3
- Partials 213 214 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The spec-tests runner was never updated to use the async exec. As a result, it always passed all tests (because, apparently, unresolved promises are always equal). This updates the runner to properly await each exec. This also skips tests that are now failing due to translator issues or unimplemented CQL features. It also fixes the implementation of includes/included in for the overload with two lists, which was returning the wrong result when the second list was null.
Update the spec-tests based on the latest versions at cqframework/cql-tests. Also update the generator to more gracefully handle the new <library> tag. Note that there are now broken tests that will be addressed in a future commit.
Remove any skipped tests that are now passing and recategorize any that fail for different reasons.
…t null items as equal
c0bfb32 to
31ff87d
Compare
elsaperelli
requested changes
Aug 12, 2025
Contributor
elsaperelli
left a comment
There was a problem hiding this comment.
Just a few comments to get input from @hossenlopp on, otherwise looks great!
elsaperelli
approved these changes
Aug 13, 2025
hossenlopp
approved these changes
Aug 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the spec-tests to mirror the latest tests in cqframework/cql-tests and fixes some of the issues that these tests reported. This brings us in closer alignment with other engines, surfaces possible areas of disagreement (see
skip-list.txt), and highlights unimplemented features (also seeskip-list.txt). Changes include:test/spec-tests.<library>tag gracefully. It currently skips the one test that has a<library>tag since we haven't implemented that yet.skip-list.txtto remove skips that are now passing, add new skips as needed, and re-categorize other skips as appropriate.AllTruelogic to return true if the items list is null.AllTrue(null)is now true.AnyTruelogic to return false if the items list is null.AnyTrue(null)is now false.InandContainsoverloads to treat null items as equal.null in {null}and{null} contains nullare now true.IncludesandIncludedInpoint/list overloads to treat null items as equal.{null} includes nullandnull included in {null}are now true.IncludesandIncludedInlist/list overloads to treat null items inside of lists as equal.{null} includes {null}and{null} included in {null}are now true.IncludesandIncludedInlist/list overloads to return null if either list argument is null.null as List<String> includes {'a'},{'a'} includes null as List<String>,null as List<String> included in {'a'},{'a'} included in null as List<String>are now all null.ReplaceMatchesto support escaping$in the substitution by using\$.ReplaceMatches('All that glitters is not gold', '\\s', '\\$')is'All$that$glitters$is$not$gold'.({1, 2, 3, 3, 4}) L aggregate A starting 1: A * Lis 72 (not 24).To test:
npm run build:alland verify there are no changesnpm testand verify tests passFixes #318
Submitter:
npm run test:plusto run tests, lint, and prettier)cql4browsers.jsbuilt withnpm run build:browserifyif source changed.Reviewer:
Name: @hossenlopp