<commit_before>define(['app', 'utils/time'], function(app, time) {
  'use strict';

  describe('duration', function() {
    it('should support milliseconds', function() {
      var result = time.duration(320);
      expect(result).to.equal('320 ms');

      var result = time.duration(1);
      expect(result).to.equal('1 ms');
    });

    it('should support seconds', function() {
      var result = time.duration(3200);
      expect(result).to.equal('3.2 sec');

      var result = time.duration(120000);
      expect(result).to.equal('120 sec');
    });

    it('should support minutes', function() {
      var result = time.duration(180000);
      expect(result).to.equal('3 min');

      var result = time.duration(360000);
      expect(result).to.equal('6 min');

      var result = time.duration(3600000);
      expect(result).to.equal('60 min');

      var result = time.duration(7200000);
      expect(result).to.equal('120 min');
    });

    it('should support hours', function() {
      var result = time.duration(14400000);
      expect(result).to.equal('4 hr');
    });
  });

  describe('timeSince', function() {
    var now;

    beforeEach(function(){
      now = new Date().getTime();
    });

    it('should support seconds', function() {
      var result = time.timeSince(now - 1000);
      expect(result).to.equal('just now');

      var result = time.timeSince(now + 1000);
      expect(result).to.equal('just now');

      var result = time.timeSince(now - 3200);
      expect(result).to.equal('just now');
    });

    it('should support minutes', function() {
      var result = time.timeSince(now - 60001);
      expect(result).to.equal('1 minute ago');

      var result = time.timeSince(now - 120000);
      expect(result).to.equal('2 minutes ago');

      var result = time.timeSince(now - 180000);
      expect(result).to.equal('3 minutes ago');<commit_msg>Probably fixed timezone in tests<commit_after>define(['app', 'utils/time'], function(app, time) {
  'use strict';

  describe('duration', function() {
    it('should support milliseconds', function() {
      var result = time.duration(320);
      expect(result).to.equal('320 ms');

      var result = time.duration(1);
      expect(result).to.equal('1 ms');
    });

    it('should support seconds', function() {
      var result = time.duration(3200);
      expect(result).to.equal('3.2 sec');

      var result = time.duration(120000);
      expect(result).to.equal('120 sec');
    });

    it('should support minutes', function() {
      var result = time.duration(180000);
      expect(result).to.equal('3 min');

      var result = time.duration(360000);
      expect(result).to.equal('6 min');

      var result = time.duration(3600000);
      expect(result).to.equal('60 min');

      var result = time.duration(7200000);
      expect(result).to.equal('120 min');
    });

    it('should support hours', function() {
      var result = time.duration(14400000);
      expect(result).to.equal('4 hr');
    });
  });

  describe('timeSince', function() {
    var now;

    beforeEach(function(){
      // There is probably an API thats exposed for this
      now = moment.utc()._d.getTime();
    });

    it('should support seconds', function() {
      var result = time.timeSince(now - 1000);
      expect(result).to.equal('just now');

      var result = time.timeSince(now + 1000);
      expect(result).to.equal('just now');

      var result = time.timeSince(now - 3200);
      expect(result).to.equal('just now');
    });

    it('should support minutes', function() {
      var result = time.timeSince(now - 60001);
      expect(result).to.equal('1 minute ago');

      var result = time.timeSince(now - 120000);
      expect(result).to.equal('2 minutes ago');

      var result = time.timeSince(now - 180000);
      expect(result).to.equal('3 minutes ago');
{'fraction_non_alphanumeric': 0.170080373347161, 'fraction_numerical': 0.05029815919108115, 'mean_word_length': 2.9127789046653145, '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': '6509608', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1130, 'n_words': 259}