Skip to content

Commit

Permalink
test(typescript): update
Browse files Browse the repository at this point in the history
  • Loading branch information
krvital committed Oct 24, 2024
1 parent eead53c commit 5d6fb2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions test/aidbox_sdk/fixtures/patient_ir_schema.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
:derivation "specialization",
:name "Patient",
:type "Patient",
:kind "resource"
:resource-name "Patient"
:elements
[{:name "multipleBirthBoolean",
Expand Down
10 changes: 1 addition & 9 deletions test/aidbox_sdk/generator/typescript_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@
"};"]))

(testing "empty elements"
(is (= "export type Base = {
resourceType: 'Base'
};"
(is (= "export type Base = {};"
(gen.typescript/generate-class {:package "hl7.fhir.r5.core",
:derivation nil,
:type "Base",
Expand All @@ -162,19 +160,16 @@
(map gen.typescript/generate-class (:backbone-elements (fixt/get-data :patient-ir-schema)))))

["export type PatientLink = BackboneElement & {"
" resourceType: 'PatientLink'"
" type: string;"
" other: Reference;"
"};"
""
"export type PatientCommunication = BackboneElement & {"
" resourceType: 'PatientCommunication'"
" language: CodeableConcept;"
" preferred?: boolean;"
"};"
""
"export type PatientContact = BackboneElement & {"
" resourceType: 'PatientContact'"
" name?: HumanName;"
" gender?: string;"
" period?: Period;"
Expand Down Expand Up @@ -237,19 +232,16 @@
"import { AdministrativeGender } from './valuesets';"
""
"export type PatientLink = BackboneElement & {"
" resourceType: 'PatientLink'"
" type: string;"
" other: Reference;"
"};"
""
"export type PatientCommunication = BackboneElement & {"
" resourceType: 'PatientCommunication'"
" language: CodeableConcept;"
" preferred?: boolean;"
"};"
""
"export type PatientContact = BackboneElement & {"
" resourceType: 'PatientContact'"
" name?: HumanName;"
" gender?: string;"
" period?: Period;"
Expand Down

0 comments on commit 5d6fb2c

Please sign in to comment.