<commit_before>/**
 * Tests for the javascript `Math`
 *
 * Those tests will use a single level of `describe`.
 * We choose `Math` because is a native javascript object
 * that works fine and has a simple API.
 *
 * Here you can see all diferent styles of custom `assetions` the you can use.
 *
 * If you want to learn TDD, the 1k style, just read this file.
 * I am sure that you will get it ;)
 **/

// Allow the tests to run in node
if (typeof module !== "undefined") require("../test.js");

// You can use the describe to group your assertions
describe("Math", function(){
  // #sqrt
  assertSqrt(4, 2);
  assertSqrt(9, 3);
  assertSqrt(16, 4);

  // The assertion function can interpolate a string with an array
  function assertSqrt(n, expectation) {
    assert("Math.sqrt(%0) === %1", [n, expectation]);
  }

  // #flor
  assertFloor(1.4, 1)
  assertFloor(3.41221341234, 3)

  // The assertion function can interpolate a string with an object
  function assertFloor(n, expectation) {
    assert("Math.floor(%n) === %result", {
      n: n, result: expectation
    });
  }

  // #pow
  assertPow(2, 2, 4);
  assertPow(4, 2, 16);
  assertPow(2, 1, 2);

  // you can customize your assertion anyway you like
  function assertPow(n1, n2, expectation) {
    var result = Math.pow(n1, n2)
      , msg = interpolate("#pow(%0, %1): %2 === %3",
        [n1, n2, expectation, result]);
<commit_msg>make jenkins fail<commit_after>/**
 * Tests for the javascript `Math`
 *
 * Those tests will use a single level of `describe`.
 * We choose `Math` because is a native javascript object
 * that works fine and has a simple API.
 *
 * Here you can see all diferent styles of custom `assetions` the you can use.
 *
 * If you want to learn TDD, the 1k style, just read this file.
 * I am sure that you will get it ;)
 **/

// Allow the tests to run in node
if (typeof module !== "undefined") require("../test.js");

// You can use the describe to group your assertions
describe("Math", function(){
  // #sqrt
  assertSqrt(4, 2);
  assertSqrt(9, 3);
  assertSqrt(16, 4);
  assertSqrt(12, 1);

  // The assertion function can interpolate a string with an array
  function assertSqrt(n, expectation) {
    assert("Math.sqrt(%0) === %1", [n, expectation]);
  }

  // #flor
  assertFloor(1.4, 1)
  assertFloor(3.41221341234, 3)

  // The assertion function can interpolate a string with an object
  function assertFloor(n, expectation) {
    assert("Math.floor(%n) === %result", {
      n: n, result: expectation
    });
  }

  // #pow
  assertPow(2, 2, 4);
  assertPow(4, 2, 16);
  assertPow(2, 1, 2);

  // you can customize your assertion anyway you like
  function assertPow(n1, n2, expectation) {
    var result = Math.pow(n1, n2)
      , msg = interpolate("#pow(%0, %1): %2 === %3",
        [n1, n2, expectation, result]);

{'fraction_non_alphanumeric': 0.13864201919658728, 'fraction_numerical': 0.033771773906861, 'mean_word_length': 3.2188905547226385, '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': '7443206', 'n_tokens_mistral': 1010, 'n_tokens_neox': 908, 'n_words': 350}