<commit_before>// std
import { deepStrictEqual, notStrictEqual, strictEqual } from 'assert';
import { createReadStream, mkdirSync, readdirSync, readFileSync, rmdirSync, unlinkSync } from 'fs';
import { join } from 'path';

// 3p
import {
  Config, ConfigNotFoundError, Context, createApp, createService, File, FileList, getApiRequestBody, HttpResponse, HttpResponseOK, IApiRequestBody, IAppController, Post, renderError
} from '@foal/core';
import * as request from 'supertest';

// FoalTS
import { Disk } from './disk.service';
import { FilesSchema, FieldsSchema, ParseAndValidateFiles } from './parse-and-validate-files.hook';

interface Actual {
  body?: any;
  files?: FileList;
}

describe('ParseAndValidateFiles', () => {

  beforeEach(() => {
    Config.set('settings.loggerFormat', 'none');
    Config.set('settings.disk.driver', 'local');

    Config.set('settings.disk.local.directory', 'uploaded');

    mkdirSync('uploaded');
    mkdirSync('uploaded/images');
  });

  afterEach(() => {
    Config.remove('settings.loggerFormat');
    Config.remove('settings.disk.driver');<commit_msg>Fix linting<commit_after>// std
import { deepStrictEqual, notStrictEqual, strictEqual } from 'assert';
import { createReadStream, mkdirSync, readdirSync, readFileSync, rmdirSync, unlinkSync } from 'fs';
import { join } from 'path';

// 3p
import {
  Config, ConfigNotFoundError, Context, createApp, createService, File, FileList, getApiRequestBody, HttpResponseOK, IApiRequestBody, IAppController, Post, renderError
} from '@foal/core';
import * as request from 'supertest';

// FoalTS
import { Disk } from './disk.service';
import { FilesSchema, FieldsSchema, ParseAndValidateFiles } from './parse-and-validate-files.hook';

interface Actual {
  body?: any;
  files?: FileList;
}

describe('ParseAndValidateFiles', () => {

  beforeEach(() => {
    Config.set('settings.loggerFormat', 'none');
    Config.set('settings.disk.driver', 'local');

    Config.set('settings.disk.local.directory', 'uploaded');

    mkdirSync('uploaded');
    mkdirSync('uploaded/images');
  });

  afterEach(() => {
    Config.remove('settings.loggerFormat');
    Config.remove('settings.disk.driver');
{'fraction_non_alphanumeric': 0.15289256198347106, 'fraction_numerical': 0.0009182736455463728, 'mean_word_length': 5.138028169014085, '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': '254349', 'n_tokens_mistral': 673, 'n_tokens_neox': 654, 'n_words': 147}