This commit is contained in:
Matteo Pagliazzi
2018-05-04 20:57:18 +02:00
committed by GitHub
parent 63cf5b6be7
commit f226b5da07
3 changed files with 103 additions and 61 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ describe('common.fns.updateStats', () => {
beforeEach(() => {
user = generateUser();
// user.addNotification = sinon.spy();
user.addNotification = sinon.spy();
});
context('No Hp', () => {
@@ -110,14 +110,14 @@ describe('common.fns.updateStats', () => {
expect(user.stats.points).to.eql(10);
});
xit('add user notification when drops are enabled', () => {
it('add user notification when drops are enabled', () => {
user.stats.lvl = 3;
updateStats(user, { });
expect(user.addNotification).to.be.calledOnce;
expect(user.addNotification).to.be.calledWith('DROPS_ENABLED');
});
xit('add user notification when the user levels up', () => {
it('add user notification when the user levels up', () => {
const initialLvl = user.stats.lvl;
updateStats(user, {
exp: 3000,
@@ -129,7 +129,7 @@ describe('common.fns.updateStats', () => {
});
});
xit('add user notification when rebirth is enabled', () => {
it('add user notification when rebirth is enabled', () => {
user.stats.lvl = 51;
updateStats(user, { });
expect(user.addNotification).to.be.calledTwice; // once is for drops enabled