Skip to content

Commit b3aaff8

Browse files
committed
fixing lint and cross-test errs
1 parent 65a7fd0 commit b3aaff8

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

test/client/BaseClient.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ describe('BaseClient', () => {
7676
});
7777
it('should iterate over all extractors gets, aggregating resultant entries in a bundle', async () => {
7878
const extractorClassesWithEntryGets = [
79-
class Ext1 { get() { return { entry: [{ data: 'here' }] }; }},
80-
class Ext2 { get() { return { entry: [{ data: 'alsoHere' }] }; }},
79+
class Ext1 { get() { return { entry: [{ resource: 'here' }] }; }},
80+
class Ext2 { get() { return { entry: [{ resource: 'alsoHere' }] }; }},
8181
class Ext3 { get() { throw new Error('Error'); }},
8282
];
8383
engine.registerExtractors(...extractorClassesWithEntryGets);

test/helpers/fhirUtils.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,10 @@ describe('getResourceCountInBundle', () => {
144144

145145
describe('isValidFHIR', () => {
146146
test('Should return true when provided valid FHIR resources', () => {
147-
expect(isValidFHIR(bundleWithOneEntry)).toEqual(true);
147+
expect(isValidFHIR(validResource)).toEqual(true);
148148
});
149149
test('Should return false when provided invalid FHIR resources', () => {
150-
const invalidBundle = { ...bundleWithOneEntry };
151-
invalidBundle.entry[0].resource = invalidResource;
152-
expect(isValidFHIR(invalidBundle)).toEqual(false);
150+
expect(isValidFHIR(invalidResource)).toEqual(false);
153151
});
154152
});
155153

test/helpers/fixtures/invalid-resource.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"id": "invalid-patient",
44
"name": [
55
{
6-
"family": [
7-
"Godel"
8-
],
6+
"family": "Godel",
97
"given": [
108
"Kurt"
119
]

test/helpers/fixtures/valid-resource.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"id": "valid-patient",
44
"name": [
55
{
6-
"family": [
7-
"Frege"
8-
],
6+
"family": "Frege",
97
"given": [
108
"Gottlob"
119
]

0 commit comments

Comments
 (0)