<commit_before>'use strict';

const sinon = require('sinon');
const should = require('should');
const mockrequire = require('mock-require');
const rewire = require('rewire');
const Bluebird = require('bluebird');
const stringify = require('json-stable-stringify');

const KuzzleMock = require('../mocks/kuzzle.mock');
const MutexMock = require('../mocks/mutex.mock.js');
const Plugin = require('../../lib/core/plugin/plugin');
const kuzzleStateEnum = require('../../lib/kuzzle/kuzzleStateEnum');
const { sha256 } = require('../../lib/util/crypto');
const { BACKEND_IMPORT_KEY } = require('../../lib/kuzzle/kuzzle')

const config = require('../../lib/config').loadConfig();

describe('/lib/kuzzle/kuzzle.js', () => {
  let kuzzle;
  let Kuzzle;
  let application;
  let clusterModuleInitStub;

  const mockedProperties = [
    'adminController',
    'ask',
    'dumpGenerator',
    'emit',
    'entryPoint',
    'funnel',
    'gc',
    'internalIndex',
    'log',
    'notifier',
    'pipe',
    'pluginsManager',
    'router',
    'services',
    'statistics',
    'tokenManager',
    'validation',
    'vault',<commit_msg>Fix lint<commit_after>'use strict';

const sinon = require('sinon');
const should = require('should');
const mockrequire = require('mock-require');
const rewire = require('rewire');
const Bluebird = require('bluebird');
const stringify = require('json-stable-stringify');

const KuzzleMock = require('../mocks/kuzzle.mock');
const MutexMock = require('../mocks/mutex.mock.js');
const Plugin = require('../../lib/core/plugin/plugin');
const kuzzleStateEnum = require('../../lib/kuzzle/kuzzleStateEnum');
const { sha256 } = require('../../lib/util/crypto');
const { BACKEND_IMPORT_KEY } = require('../../lib/kuzzle/kuzzle');

const config = require('../../lib/config').loadConfig();

describe('/lib/kuzzle/kuzzle.js', () => {
  let kuzzle;
  let Kuzzle;
  let application;
  let clusterModuleInitStub;

  const mockedProperties = [
    'adminController',
    'ask',
    'dumpGenerator',
    'emit',
    'entryPoint',
    'funnel',
    'gc',
    'internalIndex',
    'log',
    'notifier',
    'pipe',
    'pluginsManager',
    'router',
    'services',
    'statistics',
    'tokenManager',
    'validation',
    'vault',
{'fraction_non_alphanumeric': 0.19402319357716324, 'fraction_numerical': 0.0026761819803746653, 'mean_word_length': 3.71218487394958, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2103666', 'n_tokens_mistral': 733, 'n_tokens_neox': 704, 'n_words': 140}