add more tests (#26)

* added more tests

* (fix) no cpu profile.
This commit is contained in:
2021-04-29 21:42:51 +02:00
committed by GitHub
parent 23418bbc60
commit 924fca5b90
14 changed files with 196 additions and 39 deletions

View File

@ -1,14 +1,14 @@
const globals = require('../globals');
const getAttributeLevels = (Attributes = [], Character = {}) => {
let AttributeId;
let AttributeLevel;
let AttributeList = [];
for (let Attribute of Attributes) {
AttributeId = globals.Werte.find((attribute) => attribute.kuerzel === Attribute).id;
AttributeLevel = Character.attributes.find((att) => att.id === AttributeId).level;
AttributeList.push({ Name: Attribute, Level: AttributeLevel });
}
return AttributeList;
let AttributeId;
let AttributeLevel;
let AttributeList = [];
for (let Attribute of Attributes) {
AttributeId = globals.Werte.find(att => att.kuerzel === Attribute).id;
AttributeLevel = Character.attributes.find(att => att.id === AttributeId).level;
AttributeList.push({ Name: Attribute, Level: AttributeLevel });
}
return AttributeList;
};
module.exports = { getAttributeLevels};
module.exports = { getAttributeLevels };