Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(search): Log message when missing search parameter in MockClient, add tests #4604

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Change test expectation to throw
  • Loading branch information
thejwuscript authored and ThatOneBro committed May 28, 2024
commit f50daa037376b4be631d54b69e69dafcd97674d9
4 changes: 2 additions & 2 deletions packages/core/src/search/match.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ describe('Search matching', () => {
});

test('Unknown filter', () => {
expect(
expect(() =>
matchesSearchRequest(
{ resourceType: 'Patient' },
{ resourceType: 'Patient', filters: [{ code: 'unknown', operator: Operator.EQUALS, value: 'xyz' }] }
)
).toBe(false);
).toThrow('Unknown search parameter: unknown');
});

test('Boolean filter', () => {
Expand Down