amercier/esviz

View on GitHub
specs/lib/ast.spec.js

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 6 of 6 total issues

Expected parentheses around arrow function argument having a body with curly braces.
Open

ast.parseDirectory(fixturePath).then(graph => {
Severity: Minor
Found in specs/lib/ast.spec.js by eslint

Missing trailing comma.
Open

})
Severity: Minor
Found in specs/lib/ast.spec.js by eslint

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

it('adds root -> dir subdir links', () => {
expect(result.links).to.deep.contain({ source: '/', target: 'lib', type: 'subdir' });
});
Severity: Major
Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
specs/lib/ast.spec.js on lines 45..47
specs/lib/ast.spec.js on lines 91..93
specs/lib/ast.spec.js on lines 109..111

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

it('adds a root node', () => {
expect(result.nodes).to.deep.contain({ id: '/', name: '/', type: 'root' });
});
Severity: Major
Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
specs/lib/ast.spec.js on lines 77..79
specs/lib/ast.spec.js on lines 91..93
specs/lib/ast.spec.js on lines 109..111

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

it('adds root -> module child links', () => {
expect(result.links).to.deep.contain({ source: '/', target: 'lib', type: 'subdir' });
});
Severity: Major
Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
specs/lib/ast.spec.js on lines 45..47
specs/lib/ast.spec.js on lines 77..79
specs/lib/ast.spec.js on lines 109..111

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

it('adds external modules', () => {
expect(result.nodes).to.deep.contain({ id: '/chalk', name: 'chalk', type: 'external' });
});
Severity: Major
Found in specs/lib/ast.spec.js and 3 other locations - About 1 hr to fix
specs/lib/ast.spec.js on lines 45..47
specs/lib/ast.spec.js on lines 77..79
specs/lib/ast.spec.js on lines 91..93

There are no issues that match your filters.

Category
Status