command-parser/tests/Parser.test.js
Navy.gif e2503d22a0
All checks were successful
continuous-integration/drone/push Build is passing
test configs
2023-02-12 17:20:05 +02:00

11 lines
444 B
JavaScript

const { inspect } = require('node:util');
const { Parser, Command, OptionType } = require('../build');
test('Command Parser', async () => {
const command = new Command({ name: 'create', options: [{ name: 'registration-code', aliases: ['code'], type: OptionType.SUB_COMMAND }, { name: 'test' }] });
const parser = new Parser({ commands: [command], prefix: '' });
await expect(parser.parseMessage('create')).rejects.toThrow();
});