Skip to content

Commit

Permalink
test: checking right value is returned from new function
Browse files Browse the repository at this point in the history
  • Loading branch information
ahbakken committed Jan 10, 2024
1 parent eeb63b7 commit cd44fba
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { QuestionnaireItem } from '../../../../types/fhir';
import { getMaxSizeExtensionValue } from '../../../../util/extension';

describe('Attachment form component', () => {
const question: QuestionnaireItem = {
linkId: '4c71df6e-d743-46ba-d81f-f62777ffddb4',
type: 'attachment',
text: '5mb',
extension: [
{
url: 'http://hl7.org/fhir/StructureDefinition/maxSize',
valueDecimal: 5,
},
],
};
it('Should give back right value in MB',
() => {
const test = getMaxSizeExtensionValue(question);
expect(test).toBe(5);
});
});

0 comments on commit cd44fba

Please sign in to comment.