thelounge/test/plugins/inputs/indexTest.ts

18 lines
547 B
TypeScript
Raw Normal View History

import {expect} from "chai";
import inputs from "../../../server/plugins/inputs";
2019-07-02 18:02:02 +02:00
describe("inputs", function () {
describe(".getCommands", function () {
it("should return a non-empty array", function () {
expect(inputs.getCommands()).to.be.an("array").that.is.not.empty;
2019-07-02 18:02:02 +02:00
});
it("should only return strings with no whitespaces and starting with /", function () {
inputs.getCommands().forEach((command) => {
expect(command).to.be.a("string").that.does.not.match(/\s/);
2019-07-02 18:02:02 +02:00
expect(command[0]).to.equal("/");
});
});
});
});