nycJSorg/angular-presentation

View on GitHub
apps/codelab/src/app/components/babel-test-runner/babel-helpers.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function tsAstTestSuite has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function tsAstTestSuite(tests) {
  return function test(files) {
    const results = tests.map(({ title }) => ({ title, pass: false }));
    const astCache = {};

Severity: Minor
Found in apps/codelab/src/app/components/babel-test-runner/babel-helpers.ts - About 1 hr to fix

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

      return function test(files) {
        const results = tests.map(({ title }) => ({ title, pass: false }));
        const astCache = {};
    
        function getAst(filePath) {
    Severity: Minor
    Found in apps/codelab/src/app/components/babel-test-runner/babel-helpers.ts - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

          if (
            decorator.expression &&
            ts.isCallExpression(decorator.expression) &&
            decorator.expression.arguments &&
            decorator.expression.arguments[0] &&
      Severity: Major
      Found in apps/codelab/src/app/components/babel-test-runner/babel-helpers.ts - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status