forked from vergnet/application-amicale
Added basic jest tests
This commit is contained in:
parent
3bc45704f6
commit
b0094716be
2 changed files with 20 additions and 2 deletions
12
package.json
12
package.json
|
@ -5,7 +5,13 @@
|
||||||
"android": "expo start --android",
|
"android": "expo start --android",
|
||||||
"ios": "expo start --ios",
|
"ios": "expo start --ios",
|
||||||
"web": "expo start --web",
|
"web": "expo start --web",
|
||||||
"eject": "expo eject"
|
"eject": "expo eject",
|
||||||
|
"test": "jest",
|
||||||
|
"testw": "jest --watch",
|
||||||
|
"testc": "jest --coverage"
|
||||||
|
},
|
||||||
|
"jest": {
|
||||||
|
"preset": "react-native"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@expo/vector-icons": "~10.0.0",
|
"@expo/vector-icons": "~10.0.0",
|
||||||
|
@ -38,7 +44,9 @@
|
||||||
"expo-linear-gradient": "~8.0.0"
|
"expo-linear-gradient": "~8.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-preset-expo": "^8.0.0"
|
"babel-preset-expo": "^8.0.0",
|
||||||
|
"jest": "^25.1.0",
|
||||||
|
"react-test-renderer": "^16.13.1"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|
10
utils/__test__/PlanningEventManager.test.js
Normal file
10
utils/__test__/PlanningEventManager.test.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import React from 'react';
|
||||||
|
import PlanningEventManager from "../PlanningEventManager";
|
||||||
|
|
||||||
|
test('time test', () => {
|
||||||
|
expect(PlanningEventManager.formatTime("1:2")).toBe("1:2");
|
||||||
|
});
|
||||||
|
|
||||||
|
test('time test 2', () => {
|
||||||
|
expect(PlanningEventManager.formatTime("1:2")).toBe("2:2");
|
||||||
|
});
|
Loading…
Reference in a new issue