mirror of
https://github.com/thelounge/thelounge
synced 2024-12-02 08:49:19 +00:00
21 lines
582 B
JavaScript
21 lines
582 B
JavaScript
"use strict";
|
|
|
|
const expect = require("chai").expect;
|
|
const inputs = require("../../../src/plugins/inputs");
|
|
|
|
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;
|
|
});
|
|
|
|
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/);
|
|
expect(command[0]).to.equal("/");
|
|
});
|
|
});
|
|
});
|
|
});
|