<commit_before>'use strict';
const createLR = require('./../../lib/createLineRules.js');
const createLRFixture = require('./../fixtures/createLR-input.js');
const lineActivityFixture = require('./../fixtures/lineActivityObj.js')
const expect = require('expect');
const test = require('tape');
const sinon = require('sinon');

test('ruler', (t) => {
  t.plan(2);

  let addScopeName = sinon.spy(createLR.addScopeName);
  var lineActivityObj = createLR.ruler(createLRFixture);
  // console.log('called once', addScopeName.callCount);

  t.equal(typeof createLR.ruler, 'function');
  t.deepEqual(lineActivityObj, lineActivityFixture)
});



test('addLines', (t) => {
  t.plan(1);
  t.equal(typeof createLR.addLines, 'function');
});

test('ruler', (t) => {
  t.plan(1);
  t.equal(typeof createLR.addVariables, 'function');
});

test('ruler', (t) => {
  t.plan(1);
  t.equal(typeof createLR.addScopeName, 'function');
});
<commit_msg>testing addLines function is manipulating the lineactivity object as expected when invoked<commit_after>'use strict';
const createLR = require('./../../lib/createLineRules.js');
const createLRInput = require('./../fixtures/createLR-input.js');
const createLROutput = require('./../fixtures/createLR-output.js');
const lineActivityFixture = require('./../fixtures/lineActivityObj.js')
const expect = require('expect');
const test = require('tape');
const sinon = require('sinon');

test('ruler', (t) => {
  t.plan(2);

  let addScopeName = sinon.spy(createLR, 'addScopeName');
  var lineActivityObj = createLR.ruler(createLRInput.parsed);

  t.equal(typeof createLR.ruler, 'function');
  t.deepEqual(lineActivityObj, lineActivityFixture);
  console.log('called once', addScopeName.callCount);
});



test('addLines', (t) => {
  t.plan(2);
  let lineActivity = {};
  createLR.addLines('FunctionDeclaration', 'SCOPE', createLRInput.parseFunctionDec, lineActivity);
  t.deepEqual(lineActivity, createLROutput.addLines)
  t.equal(typeof createLR.addLines, 'function');

});

test('ruler', (t) => {
  t.plan(1);
  t.equal(typeof createLR.addVariables, 'function');
});

test('ruler', (t) => {
  t.plan(1);
  t.equal(typeof createLR.addScopeName, 'function');
});

{'fraction_non_alphanumeric': 0.18792866941015088, 'fraction_numerical': 0.003657978966620942, 'mean_word_length': 5.269340974212034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '7461394', 'n_tokens_mistral': 757, 'n_tokens_neox': 720, 'n_words': 133}