-
Notifications
You must be signed in to change notification settings - Fork 589
/
filter-map3.test.js
39 lines (35 loc) · 937 Bytes
/
filter-map3.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
30
31
32
33
34
35
36
37
38
const getStudentsPerCurriculum = require('../filter-map/ex3.js');
xdescribe('map + filter - exercice 3', () => {
test('getStudentsPerCurriculum', () => {
expect(getStudentsPerCurriculum(
[
{ city: 'Bordeaux',
curriculums: [
{ name: 'PHP/Symfony', numStudents: 12 },
{ name: 'JS/React', numStudents: 29 }
]
},
{
city: 'La Loupe',
curriculums: [
{ name: 'JS/Angular', numStudents: 32 }
]
},
{
city: 'Lille',
curriculums: [
{ name: 'PHP/Symfony', numStudents: 12 },
{ name: 'JS/React', numStudents: 10 }
]
},
{
city: 'Marseille',
curriculums: [
{ name: 'JS/React', numStudents: 16 }
]
}
], 'PHP/Symfony'
))
.toEqual([{ Bordeaux: 12 }, { Lille: 12 }]);
});
});