<commit_before>'use strict'

/*  ------------------------------------------------------------------------ */

global.log = require ('ololog') // for easier debugging

/*  ------------------------------------------------------------------------ */

const { Exchange, keys, values, unique, index, aggregate } = require ('../../../ccxt')
const { strictEqual: equal, deepEqual } = require ('assert')

/*  ------------------------------------------------------------------------ */

describe ('ccxt base code', () => {

/*  ------------------------------------------------------------------------ */

    require ('./functions/test.generic')
    require ('./functions/test.time')
    require ('./functions/test.type')
    // Some test files are transplitted into other languages and must be kept very simple so we put `it` call externally to them
    // Some mocha reporters will swallow `assert` failures if they are outside of `it` clause so we must call `it`
    it ('decimalToPrecision() works', () => {
        require ('./functions/test.number')
    })
    it ('date&time functions work', () => {
        require('./functions/test.datetime')
    })

/*  ------------------------------------------------------------------------ */

    it ('calculateFee() works', () => {

        const price  = 100.00
        const amount = 10.00
        const taker  = 0.0025
        const maker  = 0.0010
        const fees   = { taker, maker }
        const market = {<commit_msg>typos in comments<commit_after>'use strict'

/*  ------------------------------------------------------------------------ */

global.log = require ('ololog') // for easier debugging

/*  ------------------------------------------------------------------------ */

const { Exchange, keys, values, unique, index, aggregate } = require ('../../../ccxt')
const { strictEqual: equal, deepEqual } = require ('assert')

/*  ------------------------------------------------------------------------ */

describe ('ccxt base code', () => {

/*  ------------------------------------------------------------------------ */

    require ('./functions/test.generic')
    require ('./functions/test.time')
    require ('./functions/test.type')
    // Some test files are transpiled to other languages and must be kept very simple so we put `it` call externally to them
    // Some mocha reporters will swallow `assert` failures if they are outside of `it` clause so we must call `it`
    it ('decimalToPrecision() works', () => {
        require ('./functions/test.number')
    })
    it ('date&time functions work', () => {
        require('./functions/test.datetime')
    })

/*  ------------------------------------------------------------------------ */

    it ('calculateFee() works', () => {

        const price  = 100.00
        const amount = 10.00
        const taker  = 0.0025
        const maker  = 0.0010
        const fees   = { taker, maker }
        const market = {
{'fraction_non_alphanumeric': 0.3637602179836512, 'fraction_numerical': 0.012942779291553134, 'mean_word_length': 1.1328976034858387, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '87403', 'n_tokens_mistral': 692, 'n_tokens_neox': 655, 'n_words': 212}