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

@ -0,0 +1,23 @@
require('module-alias/register');
const { getAttributeLevels } = require('@dsabot/getAttributeLevels');
const Character = {
attributes: [
{ id: 'mut', level: 10 },
{ id: 'klugheit', level: 11 },
{ id: 'intuition', level: 12 },
{ id: 'charisma', level: 13 },
{ id: 'fingerfertigkeit', level: 14 },
{ id: 'gewandtheit', level: 15 },
{ id: 'konstitution', level: 16 },
{ id: 'koerperkraft', level: 17 },
],
};
it('should return an array', () => {
expect(getAttributeLevels(['MU', 'IN', 'KO'], Character)).toBeInstanceOf(Array);
});
it('should have 3 items in it.', () => {
expect(getAttributeLevels(['MU', 'IN', 'KO'], Character)).toHaveLength(3);
});