<commit_before><commit_msg>add test<commit_after>import { expect } from 'chai';
import { getOauthAppsObject } from '../process_data.js';
import BinarySocket from '_common/base/socket_base';

describe('getOauthAppsObject', () => {
    it('Expects default oauth object when there is no arguments', () => {
        expect(getOauthAppsObject()).to.eql({ 2: 'Binary.com Autoexpiry' });
    })

    it('Expects correct value when arguments passed', () => {
            const response = new Promise(async (resolve, reject) => {
                await BinarySocket.send({ oauth_apps: 1 }).then(result => {
                    resolve(result);
                }).catch(error => {
                    reject(error);
                });
            }) 
            response.then(result => {
                expect(Object.size(getOauthAppsObject(result))).to.be.above(1);
            });
    })
})
{'fraction_non_alphanumeric': 0.14819004524886878, 'fraction_numerical': 0.003393665158371041, 'mean_word_length': 2.22992700729927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '2652335', 'n_tokens_mistral': 256, 'n_tokens_neox': 240, 'n_words': 49}