Files
dsabot/__tests__/functions/CreateResultTable.js
TobenderZephyr d45e4faad6 Security fixes (#32)
* Generic Object Injection Sink

* (fix) "Character" is not defined.

* added eslint

* improve code quality, use refactored function

* (fix) eslint jest

* "Character" is not defined

* removed unused file Compare.js

* (fix) PointsUsed is not defined

* (fix) eslint moans jsconfig

* turn off "no-prototype-builtins"

* push code coverage
2021-05-01 20:13:15 +02:00

20 lines
480 B
JavaScript

require('module-alias/register');
const { CreateResultTable, f } = require('@dsabot/CreateResultTable');
it('turn any number into a string', () => {
expect(f(2)).toBe('+2');
expect(f(0)).toBe('0');
expect(f(-1)).toBe('-1');
});
it('should return a string', () => {
const obj = {
Attributes: [8, 8, 8],
Throws: [7, 7, 7],
PointsUsed: [0, 0, 0],
Bonus: 0,
};
expect(CreateResultTable(obj)).toEqual(expect.any(String));
});