-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.test.js
More file actions
49 lines (39 loc) · 1.34 KB
/
api.test.js
File metadata and controls
49 lines (39 loc) · 1.34 KB
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
39
40
41
42
43
44
45
46
47
48
49
const classApi = require('./api.js')
function instancierObj() {
return new classApi()
}
beforeEach(() => {
return instancierObj();
});
test('Test getParEquipement() avec \'barre de traction\'', () => {
const objApi = instancierObj()
expect(objApi.getParEquipement('barre de traction').length).toBe(3)
})
test('Test getParEquipement() avec \'barre\'', () => {
const objApi = instancierObj()
expect(objApi.getParEquipement('barre').length).toBe(30)
})
test('Test getParCible() avec \'triceps\'', () => {
const objApi = instancierObj()
expect(objApi.getParCible('triceps').length).toBe(25)
})
test('Test getParId() avec \'25\'', () => {
const objApi = instancierObj()
expect(objApi.getParId('25').length).toBe(1)
})
test('Test getParNom() avec \'soulevé de terre\'', () => {
const objApi = instancierObj()
expect(objApi.getParNom('soulevé de terre').length).toBe(1)
})
test('Test getTousEquipement()', () => {
const objApi = instancierObj()
expect(objApi.getTousEquipement().length).toBe(10)
})
test('Test getTousLesMuscles()', () => {
const objApi = instancierObj()
expect(objApi.getTousMuscles().length).toBe(17)
})
test('Test getTousPartieDuCorps()', () => {
const objApi = instancierObj()
expect(objApi.getTousPartieDuCorps().length).toBe(8)
})