-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fabc1c1
commit b8c4eaf
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
express-api/tests/unit/services/geocoder/geocoderService.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
import { AppDataSource } from "@/appDataSource"; | ||
import { GeocoderService } from "@/services/geocoder/geocoderService"; | ||
|
||
describe('UNIT - Geoserver services', () => { | ||
describe('getSiteAddresses', () => { | ||
it('should get an address from Geocoder service.', async () => { | ||
const address = await GeocoderService.getSiteAddresses('4000 Seymour pl BC'); | ||
expect(typeof(address) === 'object' && | ||
!Array.isArray(address) && | ||
address !== null ).toBe(true); | ||
expect(address.siteId != '').toBe(true); | ||
}); | ||
}); | ||
|
||
describe('getPids', () => { | ||
it('should get a list of PIDs connected to the site address.', async () => { | ||
const pids = await GeocoderService.getPids("eccd759a-8476-46b0-af5d-e1c071f8e78e"); | ||
expect(typeof(pids) === 'object' && !Array.isArray(pids) && pids !== null).toBe(true); | ||
expect(typeof(pids.pids) === 'string' && pids.pids === '000382345').toBe(true); | ||
}); | ||
}); | ||
}) |