<commit_before>/* jshint expr: true */
var expect = require('chai').expect;
var Ractive = require('ractive');

var child, parent, adapt, subchild, user;

before(function () {
  require('../index');
  adapt = Ractive.adaptors.Ractive;
  Ractive.defaults.adapt = ['Ractive'];
});

// Makes tests faster
before(function () {
  adapt.maxKeyLength = 64;
});

/*
 * simple cases
 */

describe('simple', function () {
  this.timeout(250);

  beforeEach(function () {
    child  = new Ractive();
    parent = new Ractive();
  });

  it(".get picks up the child's value", function () {
    child.set('one', 1);
    parent.set('child', child);

    expect(parent.get('child.one')).eql(1);
  });<commit_msg>Add test for .reset.<commit_after>/* jshint expr: true */
var expect = require('chai').expect;
var Ractive = require('ractive');

var child, parent, adapt, subchild, user;

before(function () {
  require('../index');
  adapt = Ractive.adaptors.Ractive;
  Ractive.defaults.adapt = ['Ractive'];
});

// Makes tests faster
before(function () {
  adapt.maxKeyLength = 64;
});

/*
 * simple cases
 */

describe('simple', function () {
  this.timeout(250);

  beforeEach(function () {
    child  = new Ractive();
    parent = new Ractive();
  });

  it(".get picks up the child's value", function () {
    child.set('one', 1);
    parent.set('child', child);

    expect(parent.get('child.one')).eql(1);
  });

  it(".reset on child gets picked up", function () {
    parent.set('child', child);
    child.reset({ ten: 10, eleven: 11 });

    expect(parent.get('child.ten')).eql(10);
    expect(parent.get('child.eleven')).eql(11);
  });
{'fraction_non_alphanumeric': 0.1972956361401352, 'fraction_numerical': 0.013521819299323909, 'mean_word_length': 3.6118980169971673, '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': '6761323', 'n_tokens_mistral': 567, 'n_tokens_neox': 534, 'n_words': 123}