feat: remove unit testing

This commit is contained in:
Jacob Nguyen
2022-06-05 11:07:15 -05:00
parent 3ea72259e4
commit fd85697636
2 changed files with 0 additions and 36 deletions

View File

@@ -1,28 +1,5 @@
import type { Message } from 'discord.js';
/**
* Checks if the author of message is a bot or not
* @param message The message to check
* @returns `true` if the author of the message is a bot, `false` otherwise
* @example
* isBot(message) ? 'yes it is a bot' : 'no it is not a bot';
*/
export function isNotFromBot(message: Message) {
return !message.author.bot;
}
/**
* Checks if the message **starts** with the prefix
* @param message The message to check
* @param prefix The prefix to check for
* @returns `true` if the message starts with the prefix, `false` otherwise
* @example
* hasPrefix(message, '!') ? 'yes it does' : 'no it does not';
*/
export function hasPrefix(message: Message, prefix?: string) {
return message.content.startsWith(prefix!);
}
/**
* Removes the first character(s) _[depending on prefix length]_ of the message
* @param msg

View File

@@ -1,13 +0,0 @@
import { fmt, hasPrefix, isNotFromBot } from '../src/handler/utilities/messageHelpers';
describe('FUNCTIONS', () => {
test('If hasPrefix is a function', () => {
expect(typeof hasPrefix).toBe('function');
});
test('if fmt is a function', () => {
expect(typeof fmt).toBe('function');
});
test('if isBot is a function', () => {
expect(typeof isNotFromBot).toBe('function');
});
});