Neovici/cosmoz-data-nav

View on GitHub

Showing 8 of 8 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

test('maintains `selected` to it\'s current value', () => {
nav.items = [{ id: 'a' }, { id: 'b' }, { id: 'c' }];
nav.selected = 1;
flushRenderQueue(nav);
expect(selectedSlide(nav).textContent).to.equal('id: b,index: 1');
Severity: Major
Found in test/spec.test.js and 1 other location - About 7 hrs to fix
test/spec.test.js on lines 180..190

Similar blocks of code found in 2 locations. Consider refactoring.
Open

test('changes to `items` reset `selected` to 0', () => {
nav.items = [{ id: 'a' }, { id: 'b' }, { id: 'c' }];
nav.selected = 1;
flushRenderQueue(nav);
expect(selectedSlide(nav).textContent).to.equal('id: b,index: 1');
Severity: Major
Found in test/spec.test.js and 1 other location - About 7 hrs to fix
test/spec.test.js on lines 233..243

CosmozDataNav has 37 functions (exceeds 20 allowed). Consider refactoring.
Open

class CosmozDataNav extends hauntedPolymer('haunted', useDataNav)(PolymerElement) {
static get template() { // eslint-disable-line max-lines-per-function
return html`
<style>
:host {
Severity: Minor
Found in cosmoz-data-nav.js - About 4 hrs to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    expect(() => {
    expect(selectedSlide(nav).textContent).to.equal('id: a,index: 0otherdata');
    }).throws('expected \'id: a,index: 0somedata\' to equal \'id: a,index: 0otherdata\'');
    Severity: Minor
    Found in test/spec.test.js and 2 other locations - About 35 mins to fix
    test/spec.test.js on lines 147..149
    test/spec.test.js on lines 172..174

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    expect(() => {
    expect(selectedSlide(nav).textContent).to.equal('id: a,index: 0newdata');
    }).throws('expected \'id: a,index: 0somedata\' to equal \'id: a,index: 0newdata\'');
    Severity: Minor
    Found in test/spec.test.js and 2 other locations - About 35 mins to fix
    test/spec.test.js on lines 158..160
    test/spec.test.js on lines 172..174

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    expect(() => {
    expect(selectedSlide(nav).textContent).to.equal('id: a,index: 0freshdata');
    }).throws('expected \'id: a,index: 0somedata\' to equal \'id: a,index: 0freshdata\'');
    Severity: Minor
    Found in test/spec.test.js and 2 other locations - About 35 mins to fix
    test/spec.test.js on lines 147..149
    test/spec.test.js on lines 158..160

    Avoid too many return statements within this function.
    Open

    return true;
    Severity: Major
    Found in cosmoz-data-nav.js - About 30 mins to fix

      BUG found
      Open

      test('renders the wrong item if the templates observer runs after `items` is set [KNOWN BUG]', async () => {
      Severity: Minor
      Found in test/spec.test.js by fixme
      Severity
      Category
      Status
      Source
      Language