-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.test.js
29 lines (24 loc) · 929 Bytes
/
index.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var {cambodia_gazetterr} = require('./index');
var banteayMeanchey = cambodia_gazetterr[0];
test('Provinces', () => {
expect(banteayMeanchey["khmer"]).toBe("បន្ទាយមានជ័យ");
expect(banteayMeanchey["latin"]).toBe("Banteay Meanchey");
})
var districts = banteayMeanchey.districts;
test('Districts', () => {
expect(districts.length).toBe(9);
expect(districts[0]["khmer"]).toBe("មង្គលបូរី");
expect(districts[0]["latin"]).toBe("Mongkol Borei");
})
var communes = districts[0].communes;
test('communes', () => {
expect(communes.length).toBe(13);
expect(communes[0]["khmer"]).toBe("បន្ទាយនាង");
expect(communes[0]["latin"]).toBe("Banteay Neang");
})
var villages = communes[0].villages;
test('villages', () => {
expect(villages.length).toBe(19);
expect(villages[0]["khmer"]).toBe("អូរធំ");
expect(villages[0]["latin"]).toBe("Ou Thum");
})