<commit_before>

const path = require('path');
const assert = require('chai').assert;
const app = require(path.join(__dirname, '..', 'lib_server', 'index'));
const rpc = require('json-rpc2');
const client = rpc.Client.$create(5000, 'localhost');



describe('app', () => {
  it('should serve JSON-RPC on port 5000', (done) => {
    // Call add function on the server
    client.call('add', [null, 1, 2], function(err, result) {
        assert.isNull(err);
        assert.equal(result, '3');
        done();
    });
  });
  
  it('should serve JSON-RPC login method', (done) => {
    client.call('login', ['pete', 'rosebud'], function(err, result) {
      assert.isDefined(err);
      assert.isNull(result);
      done();
    });
  });
});
<commit_msg>add system.describe test<commit_after>

const path = require('path');
const assert = require('chai').assert;
const app = require(path.join(__dirname, '..', 'lib_server', 'index'));
const rpc = require('json-rpc2');
const client = rpc.Client.$create(5000, 'localhost');



describe('app', () => {
  it('should serve JSON-RPC on port 5000', (done) => {
    // Call add function on the server
    client.call('add', [null, 1, 2], function(err, result) {
        assert.isNull(err);
        assert.equal(result, '3');
        done();
    });
  });
  
  it('should serve JSON-RPC login method', (done) => {
    client.call('login', ['pete', 'rosebud'], function(err, result) {
      assert.isDefined(err);
      assert.isNull(result);
      done();
    });
  });
  
  it('should serve system.describe JSON-RPC method', (done) => {
    client.call('system.describe', function(err, result) {
      assert.isNull(err);
      assert.isObject(result);
      done();
    });
  });
});

{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.01391304347826087, 'mean_word_length': 3.272277227722772, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '6908037', 'n_tokens_mistral': 580, 'n_tokens_neox': 552, 'n_words': 128}