fix tests

This commit is contained in:
Phillip Thelen
2024-09-03 15:15:20 +02:00
parent 68560894b9
commit cb865b171b
4 changed files with 2 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ describe('GET /heroes/:heroId', () => {
const heroFields = [ const heroFields = [
'_id', 'id', 'auth', 'balance', 'contributor', 'flags', 'items', '_id', 'id', 'auth', 'balance', 'contributor', 'flags', 'items',
'lastCron', 'party', 'preferences', 'profile', 'purchased', 'secret', 'achievements', 'lastCron', 'party', 'preferences', 'profile', 'purchased', 'secret', 'achievements',
'stats',
]; ];
before(async () => { before(async () => {

View File

@@ -11,6 +11,7 @@ describe('PUT /heroes/:heroId', () => {
const heroFields = [ const heroFields = [
'_id', 'auth', 'balance', 'contributor', 'flags', 'items', 'lastCron', '_id', 'auth', 'balance', 'contributor', 'flags', 'items', 'lastCron',
'party', 'preferences', 'profile', 'purchased', 'secret', 'permissions', 'achievements', 'party', 'preferences', 'profile', 'purchased', 'secret', 'permissions', 'achievements',
'stats',
]; ];
before(async () => { before(async () => {

View File

@@ -174,7 +174,6 @@ export default {
computed: { computed: {
...mapState({ user: 'user.data' }), ...mapState({ user: 'user.data' }),
statPointsIncorrect () { statPointsIncorrect () {
console.log(this.hero.stats.points, this.hero.stats.str,
this.hero.stats.int, this.hero.stats.per, this.hero.stats.int, this.hero.stats.per,
this.hero.stats.con, this.hero.stats.lvl); this.hero.stats.con, this.hero.stats.lvl);
return (parseInt(this.hero.stats.points, 10) return (parseInt(this.hero.stats.points, 10)

View File

@@ -368,7 +368,6 @@ schema.pre('save', true, async function preSaveUser (next, done) {
const history = UserHistory(); const history = UserHistory();
history.userId = this._id; history.userId = this._id;
await history.save(); await history.save();
console.log('Initialized user history');
} }
} }