switched nedb to nedb-promises (#37)
* breaking change: switched to nedb-promises * Linting * some dev dependencies * more tests * updated package version * bug fixing * changed isNaN to isString * (fix) args[0]
This commit is contained in:
@ -3,7 +3,7 @@ require('module-alias/register');
|
||||
const { CompareResults } = require('@dsabot/CompareResults');
|
||||
|
||||
it('should return an object', () => {
|
||||
let Obj = {
|
||||
const Obj = {
|
||||
Passed: 0,
|
||||
CriticalHit: 0,
|
||||
Fumbles: 0,
|
||||
@ -15,7 +15,7 @@ it('should return an object', () => {
|
||||
});
|
||||
|
||||
it('should match No. of Fumbles', () => {
|
||||
let Obj = {
|
||||
const Obj = {
|
||||
Passed: 0,
|
||||
CriticalHit: 0,
|
||||
Fumbles: 2,
|
||||
@ -26,7 +26,7 @@ it('should match No. of Fumbles', () => {
|
||||
});
|
||||
|
||||
it('should match No. of Passed', () => {
|
||||
let Obj = {
|
||||
const Obj = {
|
||||
Passed: 3,
|
||||
CriticalHit: 0,
|
||||
Fumbles: 0,
|
||||
@ -37,7 +37,7 @@ it('should match No. of Passed', () => {
|
||||
});
|
||||
|
||||
it('should match No. of Critical Hits', () => {
|
||||
let Obj = {
|
||||
const Obj = {
|
||||
Passed: 3,
|
||||
CriticalHit: 2,
|
||||
Fumbles: 0,
|
||||
@ -48,7 +48,7 @@ it('should match No. of Critical Hits', () => {
|
||||
});
|
||||
|
||||
it('should decrease Points remaining', () => {
|
||||
let Obj = {
|
||||
const Obj = {
|
||||
Passed: 3,
|
||||
CriticalHit: 0,
|
||||
Fumbles: 0,
|
||||
|
6
__tests__/functions/findMessage.js
Normal file
6
__tests__/functions/findMessage.js
Normal file
@ -0,0 +1,6 @@
|
||||
require('module-alias/register');
|
||||
const { findMessage } = require('@dsabot/findMessage');
|
||||
|
||||
it('should capitalize the first letter.', () => {
|
||||
expect(findMessage('ERROR')).toBe('Irgendwas ist schief gelaufen. 🤔');
|
||||
});
|
12
__tests__/functions/isEmpty.js
Normal file
12
__tests__/functions/isEmpty.js
Normal file
@ -0,0 +1,12 @@
|
||||
require('module-alias/register');
|
||||
const { isEmpty } = require('@dsabot/isEmpty');
|
||||
|
||||
it('should return true statements', () => {
|
||||
expect(isEmpty({})).toBeTruthy();
|
||||
expect(isEmpty()).toBeTruthy();
|
||||
expect(isEmpty('')).toBeTruthy();
|
||||
expect(isEmpty([])).toBeTruthy();
|
||||
expect(isEmpty({ key: 'value' })).toBeFalsy();
|
||||
expect(isEmpty([null])).toBeFalsy();
|
||||
expect(isEmpty([''])).toBeFalsy();
|
||||
});
|
Reference in New Issue
Block a user