<commit_before><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Cogs Test Suite</title>
  
  <link rel="stylesheet" type="text/css" href="qunit/qunit.css" />
</head>
<body>

  <h1 id="qunit-header">jsDigest Test Suite</h1>
  <h2 id="qunit-banner"></h2>
  <h2 id="qunit-userAgent"></h2>
  <ol id="qunit-tests"></ol>

<script src="qunit/qunit.js"></script>
<script src="cogs.js"></script>
<script>
  module('Core');
  
  test('Global', 2, function () {
    ok(!!window.Cogs, 'Cogs is defined');
    equals(Cogs.fn, Cogs.constructor.prototype, 'Prototype exposed as `Cogs.fn`');
  });
  
  
  /**************/
  /** Time Cog **/
  /**************/
  
  module('Time');
  
  test('Time/UTC', function () {
    var year = new Date().getFullYear(),
        date = new Date(year, 0),
        zone = date.getTimezoneOffset() * -1 * 60 * 1000;
    
    equals(Cogs.utc(), Cogs.time(), 'time <=> utc');
    
    equals(Cogs.utc(year) - Cogs.time(year), zone, 'Timezone Offset');
    
    equals(Cogs.utc(0),         -62167219200000, 'Absolute 0 -- Midnight, January 1st, Year-0 UTC');
    equals(Cogs.utc(10000) - 1, 253402300799999, '4-Year End -- December 31, Year 9999 23:59:59.999 UTC');
    
    equals(Cogs.time(0),         -62167219200000 - zone, 'Absolute 0 -- Local Time');
    equals(Cogs.time(10000) - 1, 253402300799999 - zone, '4-Year End -- Local Time');
  });
  
  
  /**************/
  /** Type Cog **/
  /**************/
  
  module('Type');
  
  test('Literal', 9, function () {
    equals(Cogs.type(undefined),    'undefined', 'undefined');
    equals(Cogs.type(null),         'null',      'null');
    equals(Cogs.type([]),           'array',     'array');<commit_msg>Set 'expected' for Time/UTC test.<commit_after><!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <title>Cogs Test Suite</title>
  
  <link rel="stylesheet" type="text/css" href="qunit/qunit.css" />
</head>
<body>

  <h1 id="qunit-header">jsDigest Test Suite</h1>
  <h2 id="qunit-banner"></h2>
  <h2 id="qunit-userAgent"></h2>
  <ol id="qunit-tests"></ol>

<script src="qunit/qunit.js"></script>
<script src="cogs.js"></script>
<script>
  module('Core');
  
  test('Global', 2, function () {
    ok(!!window.Cogs, 'Cogs is defined');
    equals(Cogs.fn, Cogs.constructor.prototype, 'Prototype exposed as `Cogs.fn`');
  });
  
  
  /**************/
  /** Time Cog **/
  /**************/
  
  module('Time');
  
  test('Time/UTC', 6, function () {
    var year = new Date().getFullYear(),
        date = new Date(year, 0),
        zone = date.getTimezoneOffset() * -1 * 60 * 1000;
    
    equals(Cogs.utc(), Cogs.time(), 'time <=> utc');
    
    equals(Cogs.utc(year) - Cogs.time(year), zone, 'Timezone Offset');
    
    equals(Cogs.utc(0),         -62167219200000, 'Absolute 0 -- Midnight, January 1st, Year-0 UTC');
    equals(Cogs.utc(10000) - 1, 253402300799999, '4-Year End -- December 31, Year 9999 23:59:59.999 UTC');
    
    equals(Cogs.time(0),         -62167219200000 - zone, 'Absolute 0 -- Local Time');
    equals(Cogs.time(10000) - 1, 253402300799999 - zone, '4-Year End -- Local Time');
  });
  
  
  /**************/
  /** Type Cog **/
  /**************/
  
  module('Type');
  
  test('Literal', 9, function () {
    equals(Cogs.type(undefined),    'undefined', 'undefined');
    equals(Cogs.type(null),         'null',      'null');
    equals(Cogs.type([]),           'array',     'array');
{'fraction_non_alphanumeric': 0.2323469088778201, 'fraction_numerical': 0.06475241722824494, 'mean_word_length': 2.9331797235023043, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '1612277', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1270, 'n_words': 246}