mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
res.respond: allow for thrid parameter (message), refactor shared ops responses and adapt tests
This commit is contained in:
@@ -18,13 +18,11 @@ describe('shared.ops.disableClasses', () => {
|
||||
user.preferences.autoAllocate = false;
|
||||
user.stats.points = 2;
|
||||
|
||||
let res = disableClasses(user);
|
||||
expect(res).to.eql({
|
||||
data: {
|
||||
preferences: user.preferences,
|
||||
stats: user.stats,
|
||||
flags: user.flags,
|
||||
},
|
||||
let [data] = disableClasses(user);
|
||||
expect(data).to.eql({
|
||||
preferences: user.preferences,
|
||||
stats: user.stats,
|
||||
flags: user.flags,
|
||||
});
|
||||
|
||||
expect(user.stats.class).to.equal('warrior');
|
||||
|
||||
Reference in New Issue
Block a user