command-parser/tests/CommandOption.test.js
Navy.gif 4fb0bed436
All checks were successful
continuous-integration/drone/push Build is passing
more tests & enforce structure
2023-02-12 18:08:52 +02:00

28 lines
540 B
JavaScript

const { Parser, Command, CommandOption, OptionType } = require('../build/index');
const opt = new CommandOption({
name: 'text',
type: OptionType.STRING
});
class TestCommand extends Command {
constructor() {
super({
name: 'test',
options: [opt]
})
}
};
const parser = new Parser({
commands: [new TestCommand()],
resolver: null
});
(async () => {
const parsed = await parser.parseMessage('test message.author')
// console.log(parsed)
})();
test('', () => {
})