<commit_before>'use strict';

var chai = require('chai');
var expect = chai.expect;

var cacheUtils = require('../lib/utils');

describe('cache utils', function() {
  describe('#format', function() {

  });

  describe('#formatMatcher', function() {

  });<commit_msg>filled utils tests<commit_after>'use strict';

var chai = require('chai');
var expect = chai.expect;

var cacheUtils = require('../lib/utils');

describe('cache utils', function() {
  describe('#format', function() {
    it('should format the cache key', function () {
      expect(cacheUtils.format('test', 1, 'user'))
      .to.equal('api:test:1:1<PASSWORD>3566ab<PASSWORD>2c9949596833adc9');
    });
  });

  describe('#formatMatcher', function() {
    it('should format the glob pattern to match key', function () {
      expect(cacheUtils.formatMatcher('test', 1))
      .to.equal('api:test:1*');
    });
  });
{'fraction_non_alphanumeric': 0.19365798414496035, 'fraction_numerical': 0.02378255945639864, 'mean_word_length': 4.423312883435583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7078523', 'n_tokens_mistral': 291, 'n_tokens_neox': 278, 'n_words': 60}