telusdigital/nightwatch-seo

View on GitHub

Showing 2 of 17 total issues

Function assertion has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports.assertion = function (context, options) {
  options = Object.assign({ meta: true, titleRegExp: /.* - TELUS.com/ }, options)

  if (!(options.titleRegExp instanceof RegExp)) throw new TypeError('`titleRegExp` should be type RegExp')

Severity: Minor
Found in assertions/seo.js - About 1 hr to fix

    Function command has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.command = (done) => {
        const assert = this.api.assert
    
        this.api.elements('tag name', `${context} h1`, (result) => {
          assert.ok(result.value.length <= 1, '<h1/> should be unique and found only once per page')
    Severity: Minor
    Found in assertions/seo.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language