<commit_before>var assert = require('chai').assert;
var BaseNotification = require('../lib/BaseNotification');

describe('BaseNotification', function () {
  it('Should properly export', function () {
    assert.isFunction(BaseNotification);
    assert.isFunction(BaseNotification.prototype.get);
    assert.isFunction(BaseNotification.prototype.set);
    assert.isFunction(BaseNotification.prototype.getProvider);
    assert.isFunction(BaseNotification.prototype.setProvider);
    assert.isFunction(BaseNotification.prototype.send);
  });

  it('Should properly make objects configurable', function () {
    var notification = new BaseNotification();

    assert.notOk(notification.get('foo'));
    assert.instanceOf(notification.set('foo', 'bar'), BaseNotification);
    assert.instanceOf(notification.set('obj', {foo: 'bar'}), BaseNotification);
    assert.deepEqual(notification.get('obj'), {foo: 'bar'});
    assert.equal(notification.get('obj.foo'), 'bar');
    assert.equal(notification.get('foo'), 'bar');
  });

  it('Should properly create notification with pre-defined config', function () {
    var notification = new BaseNotification({
      foo: 'bar',
      obj: {
        foo: 'bar'
      }
    });

    assert.equal(notification.get('foo'), 'bar');
    assert.equal(notification.get('obj.foo'), 'bar');
    assert.deepEqual(notification.get('obj'), {foo: 'bar'});
    assert.notOk(notification.get('NOT_EXISTS'));
  });

  it('Should properly get/set provider', function () {
    var notification = new BaseNotification();

    assert.notOk(notification.getProvider());
    assert.instanceOf(notification.setProvider('NOTIFICATION'), BaseNotification);
    assert.equal(notification.getProvider(), 'NOTIFICATION');<commit_msg>Add little assertion for BaseNotification<commit_after>var assert = require('chai').assert;
var BaseNotification = require('../lib/BaseNotification');

describe('BaseNotification', function () {
  it('Should properly export', function () {
    assert.isFunction(BaseNotification);
    assert.isFunction(BaseNotification.prototype.get);
    assert.isFunction(BaseNotification.prototype.set);
    assert.isFunction(BaseNotification.prototype.getProvider);
    assert.isFunction(BaseNotification.prototype.setProvider);
    assert.isFunction(BaseNotification.prototype.send);
  });

  it('Should properly make objects configurable', function () {
    var notification = new BaseNotification();

    assert.notOk(notification.get('foo'));
    assert.instanceOf(notification.set('foo', 'bar'), BaseNotification);
    assert.instanceOf(notification.set('obj', {foo: 'bar'}), BaseNotification);
    assert.deepEqual(notification.get(), {foo: 'bar', obj: {foo: 'bar'}});
    assert.deepEqual(notification.get('obj'), {foo: 'bar'});
    assert.equal(notification.get('obj.foo'), 'bar');
    assert.equal(notification.get('foo'), 'bar');
  });

  it('Should properly create notification with pre-defined config', function () {
    var notification = new BaseNotification({
      foo: 'bar',
      obj: {
        foo: 'bar'
      }
    });

    assert.equal(notification.get('foo'), 'bar');
    assert.equal(notification.get('obj.foo'), 'bar');
    assert.deepEqual(notification.get('obj'), {foo: 'bar'});
    assert.notOk(notification.get('NOT_EXISTS'));
  });

  it('Should properly get/set provider', function () {
    var notification = new BaseNotification();

    assert.notOk(notification.getProvider());
    assert.instanceOf(notification.setProvider('NOTIFICATION'), BaseNotification);
    assert.equal(notification.getProvider(), 'NOTIFICATION');
{'fraction_non_alphanumeric': 0.1605798717591302, 'fraction_numerical': 0.0, 'mean_word_length': 4.9700499168053245, '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': '2109604', 'n_tokens_mistral': 974, 'n_tokens_neox': 956, 'n_words': 173}