<commit_before>
const expect = require('chai').expect;
const Scale = require('../../../src/scale/');

describe('scale pow', () => {

  const scale = Scale.pow({
    exponent: 2,
    min: 0,
    max: 100
  });

  it('cfg', () => {
    expect(scale.exponent).to.be.equal(2);
    expect(scale.type).to.be.equal('pow');
  });

  it('scale', () => {
    const val = scale.scale(0);
    expect(val).to.be.equal(0);

    expect(Math.round(scale.scale(25) * 10) / 10).to.be.equal(0.5);
    expect(scale.scale(100)).to.be.equal(1);
  });

  it('invert', () => {
    expect(scale.invert(0)).to.be.equal(0);
    expect(parseInt(scale.invert(0.5))).to.be.equal(25);

    expect(parseInt(scale.invert(1))).to.be.equal(100);
  });

  it('ticks', () => {
    const ticks = scale.getTicks();
    expect(ticks.length).to.be.equal(11);
    expect(ticks[ticks.length - 1].value).to.be.equal(1);
  });
<commit_msg>fix(eslint): close the linebreak-style rule to support windows os<commit_after>
const expect = require('chai').expect;
const Scale = require('../../../src/scale/');

describe('scale pow', () => {

  const scale = Scale.pow({
    exponent: 2,
    min: 0,
    max: 100
  });

  it('cfg', () => {
    expect(scale.exponent).to.be.equal(2);
    expect(scale.type).to.be.equal('pow');
  });

  it('scale', () => {
    const val = scale.scale(0);
    expect(val).to.be.equal(0);

    expect(Math.round(scale.scale(25) * 10) / 10).to.be.equal(0.5);
    expect(scale.scale(100)).to.be.equal(1);
  });

  it('invert', () => {
    expect(scale.invert(0)).to.be.equal(0);
    expect(parseInt(scale.invert(0.5))).to.be.equal(25);

    expect(parseInt(scale.invert(1))).to.be.equal(100);
  });

  it('ticks', () => {
    const ticks = scale.getTicks();
    expect(ticks.length).to.be.equal(6);
    expect(ticks[ticks.length - 1].value).to.be.equal(1);
  });

{'fraction_non_alphanumeric': 0.24361065796628603, 'fraction_numerical': 0.03643284393692224, 'mean_word_length': 3.144144144144144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '6858965', 'n_tokens_mistral': 761, 'n_tokens_neox': 707, 'n_words': 90}