<commit_before>var assert = require('chai').assert,
    sinon = require('sinon'),
    valuable = require('..'),
    rawValues = require('./mock_values');

describe('value', function() {
  it('can be observe()-ed with a function callback', function() {
    assert.doesNotThrow(function() {
      var value = valuable();
      value.observe(function(){});
    });
  });

  it('throws if observe() called with non-function', function() {
    assert.throws(function() {
      var value = valuable();
      value.observe(1);
    });
  });

  it('returns the real value via val()', function() {<commit_msg>rename spec<commit_after>var assert = require('chai').assert,
    sinon = require('sinon'),
    valuable = require('..'),
    rawValues = require('./mock_values');

describe('Value', function() {
  it('can be observe()-ed with a function callback', function() {
    assert.doesNotThrow(function() {
      var value = valuable();
      value.observe(function(){});
    });
  });

  it('throws if observe() called with non-function', function() {
    assert.throws(function() {
      var value = valuable();
      value.observe(1);
    });
  });

  it('returns the real value via val()', function() {
{'fraction_non_alphanumeric': 0.18363939899833054, 'fraction_numerical': 0.001669449081803005, 'mean_word_length': 3.4407407407407407, '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': '3261891', 'n_tokens_mistral': 350, 'n_tokens_neox': 346, 'n_words': 87}