Files
factorio-clusterio/test/ctl.js
T
Hornwitser 3485c9ac68 Rename clusterctl to clusterioctl
Rename the clusterctl command line utility to clusterioctl in order to
be consistent with the naming of the commands for master and slave.
2020-09-21 18:00:07 +02:00

20 lines
532 B
JavaScript

"use strict";
const assert = require("assert").strict;
const { testLines } = require("./lib/factorio/lines");
const clusterioctl = require("@clusterio/ctl/ctl.js");
describe("clusterioctl", function() {
describe("formatOutputColored()", function() {
it("should pass the test lines", function() {
for (let [reference, output] of testLines) {
let line = clusterioctl._formatOutputColored(output);
// Strip colours
line = line.replace(/\x1B\[\d+m/g, "");
assert.deepEqual(line, reference);
}
});
});
});