<commit_before>'use strict'

/**
 * @fileoverview Discourage use of selectors within describe blocks.
 * @author <NAME>
 */

var rule = require('../../lib/rules/no-describe-selectors')
var RuleTester = require('eslint').RuleTester
var eslintTester = new RuleTester()

eslintTester.run('no-describe-selectors', rule, {
  valid: [
    'var PageObject = function () { this.getDOMElement = function () { return element(by.css(".some-element")); }; }',
    'module.exports = { getDOMElement: function () { return element(by.css(".some-element")); } };'
  ],

  invalid: [
    {
      code: 'describe(function () { element(by.addLocator("newLocator", function () { } )); })',
      errors: [{<commit_msg>test(rules): remove author comment from a test<commit_after>'use strict'

var rule = require('../../lib/rules/no-describe-selectors')
var RuleTester = require('eslint').RuleTester
var eslintTester = new RuleTester()

eslintTester.run('no-describe-selectors', rule, {
  valid: [
    'var PageObject = function () { this.getDOMElement = function () { return element(by.css(".some-element")); }; }',
    'module.exports = { getDOMElement: function () { return element(by.css(".some-element")); } };'
  ],

  invalid: [
    {
      code: 'describe(function () { element(by.addLocator("newLocator", function () { } )); })',
      errors: [{
{'fraction_non_alphanumeric': 0.18829707426856715, 'fraction_numerical': 0.0, 'mean_word_length': 4.053030303030303, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5090691', 'n_tokens_mistral': 427, 'n_tokens_neox': 414, 'n_words': 82}