Show accurate experience notifications (#10676)

* Show accurate experience notifications

Add unit tests for exp notifications

* use array to compute exp and lvl values for notification changes

* Add tests for user loosing xp cases
This commit is contained in:
Rene Cordier
2018-10-14 01:24:23 +07:00
committed by Matteo Pagliazzi
parent eee5f2f1df
commit fe39ef72ff
4 changed files with 173 additions and 17 deletions

View File

@@ -47,6 +47,5 @@ export function round (number, nDigits) {
}
export function getXPMessage (val) {
if (val < -50) return; // don't show when they level up (resetting their exp)
return `${getSign(val)} ${round(val)}`;
}