Files
factorio-clusterio/test/clusterctl.js
T
Hornwitser da1cbc16f7 Restructre clusterctl cli interface
Turn the flat list of commands into a hierarchy of commands, converting
most required parameters into positional parameters and add plugin
loading support for clusterctl.
2020-08-18 18:52:11 +02:00

25 lines
600 B
JavaScript

"use strict";
const assert = require("assert").strict;
const chalk = require("chalk");
const { testLines } = require("./lib/factorio/lines");
const clusterctl = require("../clusterctl.js");
describe("clusterctl", function() {
describe("formatOutputColored()", function() {
it("should pass the test lines", function() {
// Ensure tests get uncoloured output.
let old = chalk.level;
chalk.level = 0;
for (let [reference, output] of testLines) {
let line = clusterctl._formatOutputColored(output);
assert.deepEqual(line, reference);
}
chalk.level = old;
});
});
});