mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix(test): make sure error is catched using done() callback
This commit is contained in:
@@ -76,13 +76,14 @@ describe('shared.ops.changeClass', () => {
|
||||
});
|
||||
|
||||
context('has user.preferences.disableClasses !== true', () => {
|
||||
it('and less than 3 gems', () => {
|
||||
it('and less than 3 gems', (done) => {
|
||||
user.balance = 0.5;
|
||||
try {
|
||||
changeClass(user);
|
||||
} catch (err) {
|
||||
expect(err).to.be.an.instanceof(NotAuthorized);
|
||||
expect(err.message).to.equal(i18n.t('notEnoughGems'));
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user