<commit_before>var should = require('chai').should(),
    expect = require('chai').expect;

var oddslib = require('../oddslib');

describe('odds construction', function() {
  it('cannot be called manually', function() {
    expect(oddslib.Odds).to.throw(Error);
  });

  it('supports decimal/EU odds', function() {
    oddslib.fromDecimal(1.5).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromDecimal(1.5).toDecimal().should.equal(1.5);
  });

  it('supports Moneyline odds', function() {
    oddslib.fromMoneyline(-500).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromMoneyline(-500).toDecimal().should.equal(1.20);
    oddslib.fromMoneyline(500).toDecimal().should.equal(6.00);
  });

  it('supports Hong Kong odds', function() {
    oddslib.fromHongKong(0.2).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromHongKong(0.2).toDecimal().should.equal(1.20);
  });

  it('supports UK/fractional odds', function() {
    oddslib.fromFractional(5, 2).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromFractional(5, 2).toDecimal().should.equal(3.50);
  });

  it('supports implied probability', function() {
    oddslib.fromImpliedProbability(0.5).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromImpliedProbability(0.5).toDecimal().should.equal(2.00);
  });

  it('support Malay odds', function() {
    oddslib.fromMalay(0.2).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromMalay(-0.4).toDecimal().should.equal(3.5);
    oddslib.fromMalay(0.75).toDecimal().should.equal(1.75);
  });

  it('support Indonesian odds', function() {
    oddslib.fromIndonesian(-5.0).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromIndonesian(-5.0).toDecimal().should.equal(1.2);
    oddslib.fromIndonesian(3.0).toDecimal().should.equal(4.0);
  });
});

describe('odds conversion', function() {<commit_msg>Fix test labels typos<commit_after>var should = require('chai').should(),
    expect = require('chai').expect;

var oddslib = require('../oddslib');

describe('odds construction', function() {
  it('cannot be called manually', function() {
    expect(oddslib.Odds).to.throw(Error);
  });

  it('supports decimal/EU odds', function() {
    oddslib.fromDecimal(1.5).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromDecimal(1.5).toDecimal().should.equal(1.5);
  });

  it('supports Moneyline odds', function() {
    oddslib.fromMoneyline(-500).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromMoneyline(-500).toDecimal().should.equal(1.20);
    oddslib.fromMoneyline(500).toDecimal().should.equal(6.00);
  });

  it('supports Hong Kong odds', function() {
    oddslib.fromHongKong(0.2).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromHongKong(0.2).toDecimal().should.equal(1.20);
  });

  it('supports UK/fractional odds', function() {
    oddslib.fromFractional(5, 2).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromFractional(5, 2).toDecimal().should.equal(3.50);
  });

  it('supports implied probability', function() {
    oddslib.fromImpliedProbability(0.5).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromImpliedProbability(0.5).toDecimal().should.equal(2.00);
  });

  it('supports Malay odds', function() {
    oddslib.fromMalay(0.2).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromMalay(-0.4).toDecimal().should.equal(3.5);
    oddslib.fromMalay(0.75).toDecimal().should.equal(1.75);
  });

  it('supports Indonesian odds', function() {
    oddslib.fromIndonesian(-5.0).should.be.an.instanceof(oddslib.Odds);
    oddslib.fromIndonesian(-5.0).toDecimal().should.equal(1.2);
    oddslib.fromIndonesian(3.0).toDecimal().should.equal(4.0);
  });
});

describe('odds conversion', function() {
{'fraction_non_alphanumeric': 0.19201312910284463, 'fraction_numerical': 0.0350109409190372, 'mean_word_length': 4.574695121951219, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2678170', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1304, 'n_words': 139}