<commit_before>pluginDir = __dirname + '/../'
toType = (obj) -> ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
assert = require('chai').assert;
async = require('async')
path = require('path')


try
  jy = require('jellyjs')
catch e
  root = __dirname + '/../../../../'
  jy = require("#{root}/index.js")

populateWithHttp = (params, cb) ->
    jelly = new jy.Jelly()
    async.waterfall([
      (cb) ->
          httpServerPlugin = path.dirname(require.resolve('jellyjs-plugin-httpserver'))
          jelly.getPluginDirectoryList().readPluginFromPath(httpServerPlugin, 'httpserver', cb)
      # we execute manually the server before
      (dt, cb) ->
          dt.getPluginInterface().oncall({}, {pluginParameters:{httpserver:{port:9876}}}, (err) ->
            cb()
          )
      (cb) ->
        jelly.getPluginDirectoryList().readPluginFromPath(pluginDir, 'routing', (err, dt) -> cb(err, dt))
      (dt, cb) ->
        dt.getPluginInterface().load((err) -> cb(err, dt))
      (dt, cb) ->
        dt.getPluginInterface().oncall({}, params, (err) ->
            cb(err)  
        )<commit_msg>tests should be ok now<commit_after>pluginDir = __dirname + '/../'
toType = (obj) -> ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
assert = require('chai').assert;
async = require('async')
path = require('path')


try
  jy = require('jellyjs')
catch e
  root = __dirname + '/../../../../'
  jy = require("#{root}/index.js")


populateWithHttp = (params, cb) ->
    jelly = new jy.Jelly()
    async.waterfall([
      (cb) ->
          httpServerPlugin = path.dirname(require.resolve('jellyjs-plugin-httpserver'))
          jelly.getPluginDirectoryList().readPluginFromPath(httpServerPlugin, 'httpserver', cb)
      # we execute manually the server before
      (dt, cb) ->
          dt.getPluginInterface().oncall({}, {pluginParameters:{httpserver:{port:9876}}}, (err) ->
            cb()
          )
      (cb) ->
        jelly.getPluginDirectoryList().readPluginFromPath(pluginDir, 'routing', (err, dt) -> cb(err, dt))
      (dt, cb) ->
        dt.getPluginInterface().load((err) -> cb(err, dt))
      (dt, cb) ->
        dt.getPluginInterface().oncall({}, params, (err) ->
            cb(err)  
        )
{'fraction_non_alphanumeric': 0.19749776586237713, 'fraction_numerical': 0.004468275245755138, 'mean_word_length': 2.719269102990033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, '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': '5279034', 'n_tokens_mistral': 730, 'n_tokens_neox': 723, 'n_words': 130}