<commit_before>import {readDoc, assert, find} from './../util.js';

/** @test {IdentifiersDocBuilder} */
describe('Identifiers:', ()=> {
  let doc = readDoc('identifiers.html');

  /** @test {IdentifiersDocBuilder#_buildIdentifierDoc} */
  it('has class summary.', ()=>{
    find(doc, '[data-ice="classSummary"]', (doc)=>{
      assert.includes(doc, '[data-ice="target"]:nth-of-type(4)', 'public MyClass1 this class was deprecated. use MyClass1Ex instead of this class. this class is experimental. this class is dangerous. this is MyClass1 desc.');
      assert.includes(doc, '[data-ice="target"]:nth-of-type(25)', 'public SuperMyClass1 this is SuperMyClass1.');
    });
  });

  /** @test {IdentifiersDocBuilder#_buildIdentifierDoc} */
  it('has interface summary.', ()=>{
    find(doc, '[data-ice="interfaceSummary"]', (doc)=>{
      assert.includes(doc, '[data-ice="target"]:nth-of-type(4)', 'public MyInterface3 this is MyInterface3 desc.');
    });
  });

  /** @test {IdentifiersDocBuilder#_buildIdentifierDoc} */
  it('has function summary.', ()=>{
    find(doc, '[data-ice="functionSummary"]', (doc)=>{
      assert.includes(doc, '[data-ice="target"]:nth-of-type(1)', 'public myFunction1() this is myFunction1 desc.');
      assert.includes(doc, '[data-ice="target"]:nth-of-type(5)', 'public myFunction5(p1: number, p2: string): Object this is myFunction5 desc.');
    });
  });
<commit_msg>fixed IdentifiersDocTest test - babylon can parse decorators /extra function.<commit_after>import {readDoc, assert, find} from './../util.js';

/** @test {IdentifiersDocBuilder} */
describe('Identifiers:', ()=> {
  let doc = readDoc('identifiers.html');

  /** @test {IdentifiersDocBuilder#_buildIdentifierDoc} */
  it('has class summary.', ()=>{
    find(doc, '[data-ice="classSummary"]', (doc)=>{
      assert.includes(doc, '[data-ice="target"]:nth-of-type(4)', 'public MyClass1 this class was deprecated. use MyClass1Ex instead of this class. this class is experimental. this class is dangerous. this is MyClass1 desc.');
      assert.includes(doc, '[data-ice="target"]:nth-of-type(25)', 'public SuperMyClass1 this is SuperMyClass1.');
    });
  });

  /** @test {IdentifiersDocBuilder#_buildIdentifierDoc} */
  it('has interface summary.', ()=>{
    find(doc, '[data-ice="interfaceSummary"]', (doc)=>{
      assert.includes(doc, '[data-ice="target"]:nth-of-type(4)', 'public MyInterface3 this is MyInterface3 desc.');
    });
  });

  /** @test {IdentifiersDocBuilder#_buildIdentifierDoc} */
  it('has function summary.', ()=>{
    find(doc, '[data-ice="functionSummary"]', (doc)=>{
      assert.includes(doc, '[data-ice="target"]:nth-of-type(2)', 'public myFunction1() this is myFunction1 desc.');
      assert.includes(doc, '[data-ice="target"]:nth-of-type(6)', 'public myFunction5(p1: number, p2: string): Object this is myFunction5 desc.');
    });
  });

{'fraction_non_alphanumeric': 0.20090845562543674, 'fraction_numerical': 0.013277428371767994, 'mean_word_length': 4.691848906560637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '2390440', 'n_tokens_mistral': 920, 'n_tokens_neox': 913, 'n_words': 202}