<commit_before>"use strict";

/*global describe, it, before, beforeEach, after, afterEach */

const assert = require("assert");
const cmdl = require("../../built/distributed/cli/command_line");
const log = require("../../built/util/logger");

//log.logger().setLevel("none");

describe('CommandLineHandler', function () {
    it('constructable 1', function () {
        let target = new cmdl.CommandLineHandler({}, []);
    });
    it('constructable - no cmdline', function () {
        let target = new cmdl.CommandLineHandler({});
    });
    it('empty command-line', function (done) {
        let target = new cmdl.CommandLineHandler({}, []);
        target.run((err) => {
            assert.ok(err, "Error expected");
            done();
        });
    });
    it('register', function (done) {
        let tuuid = "some-topology-uuid";
        let method_called = false;
        let dummy_storage = {
            registerTopology: (uuid, config, cb) => {
                assert.equal(uuid, tuuid);<commit_msg>Setting better logging levels for unit tests<commit_after>"use strict";

/*global describe, it, before, beforeEach, after, afterEach */

const assert = require("assert");
const cmdl = require("../../built/distributed/cli/command_line");
const log = require("../../built/util/logger");

log.logger().setLevel("error");

describe('CommandLineHandler', function () {
    it('constructable 1', function () {
        let target = new cmdl.CommandLineHandler({}, []);
    });
    it('constructable - no cmdline', function () {
        let target = new cmdl.CommandLineHandler({});
    });
    it('empty command-line', function (done) {
        let target = new cmdl.CommandLineHandler({}, []);
        target.run((err) => {
            assert.ok(err, "Error expected");
            done();
        });
    });
    it('register', function (done) {
        let tuuid = "some-topology-uuid";
        let method_called = false;
        let dummy_storage = {
            registerTopology: (uuid, config, cb) => {
                assert.equal(uuid, tuuid);
{'fraction_non_alphanumeric': 0.17103984450923226, 'fraction_numerical': 0.0009718172983479105, 'mean_word_length': 2.6965888689407542, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1983020', 'n_tokens_mistral': 580, 'n_tokens_neox': 571, 'n_words': 137}