<commit_before>describe('HotPath', function () {
  'use strict';

  var assume = require('assume')
    , HotPath = require('../hotpath');

  it('is exposed as function', function () {
    assume(HotPath).to.be.a('function');
  });

  describe('#set', function () {
    it('only stores data if we do not blow out of memory', function () {
      var hp = new HotPath({ available: 100 });

      assume(hp.set('foo', new Buffer(40))).to.equal(false);
      assume(hp.set('foo', new Buffer(2))).to.equal(true);<commit_msg>[test] Add more specific store checks<commit_after>describe('HotPath', function () {
  'use strict';

  var assume = require('assume')
    , HotPath = require('../hotpath');

  it('is exposed as function', function () {
    assume(HotPath).to.be.a('function');
  });

  describe('#set', function () {
    it('only stores data if we do not blow out of memory', function () {
      var hp = new HotPath({ available: 100 });

      assume(hp.set('foo', new Buffer(40))).to.equal(false);
      assume(hp.get('foo')).to.equal(undefined);

      assume(hp.set('foo', new Buffer(2))).to.equal(true);
      assume(hp.get('foo')).to.be.a('buffer');
{'fraction_non_alphanumeric': 0.1979256698357822, 'fraction_numerical': 0.010371650821089023, 'mean_word_length': 3.6693548387096775, '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': '7446805', 'n_tokens_mistral': 381, 'n_tokens_neox': 366, 'n_words': 88}