<commit_before>'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(3);

  let addScopeName = sinon.spy(createLR, 'addScopeName');
  let addVariables = sinon.spy(createLR, 'addVariables');
  let addLines = sinon.spy(createLR, 'addLines');
  console.log('----- BEFORE CALLING ---', addScopeName.callCount);






  var lineActivityObj = createLR.ruler(createLRInput.parsed);

  t.equal(typeof createLR.ruler, 'function');
  t.deepEqual(lineActivityObj, lineActivityFixture);
  t.equal(addLines.callCount, 16);
  t.equal(addVariables.callCount, 5);
  console.log('call count', addScopeName.callCount);
});<commit_msg>testing how many times addscopename is called when ruler is 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(4);

  let addScopeName = sinon.spy(createLR, 'addScopeName');
  let addVariables = sinon.spy(createLR, 'addVariables');
  let addLines = sinon.spy(createLR, 'addLines');
  console.log('----- BEFORE CALLING ---', addScopeName.callCount);






  var lineActivityObj = createLR.ruler(createLRInput.parsed);

  t.equal(typeof createLR.ruler, 'function');
  t.deepEqual(lineActivityObj, lineActivityFixture);
  t.equal(addLines.callCount, 16);
  t.equal(addScopeName.callCount, 4);
  console.log('call count', addScopeName.callCount);
});
{'fraction_non_alphanumeric': 0.17535070140280562, 'fraction_numerical': 0.004008016032064128, 'mean_word_length': 5.033232628398792, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1856118', 'n_tokens_mistral': 678, 'n_tokens_neox': 630, 'n_words': 124}