Skip to content

Commit

Permalink
Add more tag validation unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
garethj2 committed Jan 19, 2024
1 parent 34cfeda commit bdd9622
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions spec/core/HNamespace.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,45 @@ describe('HNamespace', function (): void {
)
})

it('validates a conjunct', function (): void {
expect(() =>
defs.validate(
'mobile-phone',
new HDict({
mobile: HMarker.make(),
phone: HMarker.make(),
device: HMarker.make(),
})
)
).not.toThrow()
})

it('validates a marker tag', function (): void {
expect(() =>
defs.validate(
'active',
new HDict({
active: HMarker.make(),
})
)
).not.toThrow()
})

it('validates an airHandlingEquip for an ahu', function (): void {
expect(() =>
defs.validate('airHandlingEquip', dict)
).not.toThrow()
})

it('validates userAuth for a dict', function (): void {
expect(() =>
defs.validate(
'userAuth',
new HDict({ userAuth: new HDict() })
)
).not.toThrow()
})

describe('compulsory', function (): void {
beforeEach(function (): void {
defs.byName('dis')?.set('compulsory', HMarker.make())
Expand Down

0 comments on commit bdd9622

Please sign in to comment.