<commit_before>should = require 'should'
async = require 'async'
_ = require 'lodash'
logger = require 'torch'
{focus} = require 'qi'
{join} = require 'path'

mockery = require 'mockery'
bus = require '../lib/bus'
core = require '../lib/core'


describe 'core.request', ->
  beforeEach (done) ->
    mockery.enable
      warnOnReplace: false,
      warnOnUnregistered: false

    mockery.registerAllowables [join(__dirname, '..', 'package')]

    mockery.registerMock "#{process.cwd()}/node_modules/axiom-base", {
      services:
        runtime: (args, next) ->
          next null, {message: 'axiom-base'}
    }

    core.init {timeout: 20}
    @moduleName = 'server'
    @serviceName = 'start'
    @channel = "#{@moduleName}.#{@serviceName}"
    @data =
      x: 2
      y: 'hello'
<commit_msg>Modify 'core' test to not warn on config override 'require's<commit_after>should = require 'should'
async = require 'async'
_ = require 'lodash'
logger = require 'torch'
{focus} = require 'qi'
{join} = require 'path'

mockery = require 'mockery'
bus = require '../lib/bus'
core = require '../lib/core'


describe 'core.request', ->
  beforeEach (done) ->
    mockery.enable
      warnOnReplace: false,
      warnOnUnregistered: false

    mockery.registerAllowables [
      join(__dirname, '..', 'package')
      join(__dirname, '..', 'Axiom')
      join(__dirname, '..', 'axiom', 'base')
    ]

    mockery.registerMock "#{process.cwd()}/node_modules/axiom-base", {
      services:
        runtime: (args, next) ->
          next null, {message: 'axiom-base'}
    }

    core.init {timeout: 20}
    @moduleName = 'server'
    @serviceName = 'start'
    @channel = "#{@moduleName}.#{@serviceName}"
    @data =
      x: 2
      y: 'hello'

{'fraction_non_alphanumeric': 0.1642651296829971, 'fraction_numerical': 0.00345821325648415, 'mean_word_length': 2.9365079365079363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6296551', 'n_tokens_mistral': 590, 'n_tokens_neox': 570, 'n_words': 138}