<commit_before>'use strict';
require('../../init');
let Client = require('../../../lib/client');

describe('Get-status', function () {
    it('Should work', function (done) {
        let client = Client();
        client.on('open', onOpen(client));
        client.on('error', onError(done));
        client.on('message', onMessage(client, done));
    });
});

let callStack = [];
function onOpen(client) {
    return function () {
        // let procedure = client.services.spaceCenter.clearTarget();
        // callStack.push(procedure.decode);
        // client.send(procedure.call);
        let procedure = client.services.spaceCenter.getActiveVessel();
        callStack.push(procedure.decode);
        client.send(procedure.call);
    };
}

function onError(done) {
    return function (err) {
        done(err);
    };
}
var counter = 0;<commit_msg>adding on close error event<commit_after>'use strict';
require('../../init');
let Client = require('../../../lib/client');

describe('Get-status', function () {
    it('Should work', function (done) {
        let client = Client();
        client.on('open', onOpen(client));
        client.on('error', onError(done));
        client.on('message', onMessage(client, done));
        client.on('close', onClose(done));
    });
});

let callStack = [];
function onOpen(client) {
    return function () {
        // let procedure = client.services.spaceCenter.clearTarget();
        // callStack.push(procedure.decode);
        // client.send(procedure.call);
        let procedure = client.services.spaceCenter.getActiveVessel();
        callStack.push(procedure.decode);
        client.send(procedure.call);
    };
}

function onError(done) {
    return function (err) {
        done(err);
    };
}
function onClose(done) {
    return function (err) {
        console.log('err');
        done(err);
    };
}
var counter = 0;
{'fraction_non_alphanumeric': 0.17750533049040512, 'fraction_numerical': 0.0010660980810234541, 'mean_word_length': 2.739043824701195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3825847', 'n_tokens_mistral': 551, 'n_tokens_neox': 535, 'n_words': 106}