Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallaby seems unable to process typescript #2839

Closed
sdrowe opened this issue Oct 19, 2021 · 5 comments
Closed

Wallaby seems unable to process typescript #2839

sdrowe opened this issue Oct 19, 2021 · 5 comments

Comments

@sdrowe
Copy link

sdrowe commented Oct 19, 2021

Issue description or question

Wallaby diagnostics report

{
  editorVersion: 'IntelliJ IDEA 2021.3 EAP',
  pluginVersion: '1.0.225',
  editorType: 'IntelliJ',
  osVersion: 'darwin 21.1.0',
  nodeVersion: 'v14.15.1',
  coreVersion: '1.0.1167',
  checksum: 'ODA4NjA4OWZlMTAzZTZhNzE2ZjhiNmFjYTg0YTI2MGQsMTY1MTYyMjQwMDAwMCww',
  config: {
    files: [
      { pattern: 'libs/shared/src/**/*.ts', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: 'apps/carrier/src/**/*.ts', ignore: false, trigger: true, load: true, order: 2 },
      { pattern: 'apps/customer/src/**/*.ts', ignore: false, trigger: true, load: true, order: 3 },
      { pattern: 'libs/shared/src/**/*spec.ts', ignore: true, trigger: true, load: true },
      { pattern: 'apps/carrier/src/**/*spec.ts', ignore: true, trigger: true, load: true },
      { pattern: 'apps/customer/src/**/*spec.ts', ignore: true, trigger: true, load: true }
    ],
    tests: [
      { pattern: 'libs/shared/src/**/*spec.ts', ignore: false, trigger: true, load: true, test: true, order: 4 },
      { pattern: 'apps/carrier/src/**/*spec.ts', ignore: false, trigger: true, load: true, test: true, order: 5 },
      { pattern: 'apps/customer/src/**/*spec.ts', ignore: false, trigger: true, load: true, test: true, order: 6 }
    ],
    diagnostics: {
      angular: {
        workspace: {
          version: 1,
          projects: {
            customer: {
              projectType: 'application',
              schematics: { '@nrwl/angular:component': { style: 'scss' } },
              root: 'apps/customer',
              sourceRoot: 'apps/customer/src',
              prefix: 'app',
              architect: {
                build: {
                  builder: '@angular-devkit/build-angular:browser',
                  options: {
                    outputPath: 'dist/apps/customer',
                    index: 'apps/customer/src/index.html',
                    main: 'apps/customer/src/main.ts',
                    polyfills: 'apps/customer/src/polyfills.ts',
                    tsConfig: 'apps/customer/tsconfig.app.json',
                    aot: false,
                    assets: [
                      'apps/customer/src/favicon.ico',
                      'apps/customer/src/assets',
                      { glob: '**/*', input: 'node_modules/@jbhunt-ds/icons/dist/font', output: '/assets/fonts/jbh-icon' },
                      { glob: '**/*', input: 'node_modules/lib-platform-services/src', output: '/assets' },
                      'apps/customer/src/manifest.webmanifest'
                    ],
                    styles: [
                      { input: 'node_modules/@jbhunt-ds/icons/dist/font/jbh-icons.scss', bundleName: 'jbhIcons' },
                      { input: 'node_modules/primeng/resources/primeng.min.css', bundleName: 'primengBase' },
                      { input: 'apps/customer/src/styles.scss', bundleName: 'globals' }
                    ],
                    scripts: []
                  },
                  configurations: {
                    production: {
                      fileReplacements: [ { replace: 'apps/customer/src/environments/environment.ts', with: 'apps/customer/src/environments/environment.prod.ts' } ],
                      outputHashing: 'all',
                      sourceMap: false,
                      extractCss: true,
                      namedChunks: false,
                      aot: true,
                      extractLicenses: true,
                      vendorChunk: false,
                      buildOptimizer: true,
                      budgets: [ { type: 'initial', maximumWarning: '2mb', maximumError: '5mb' }, { type: 'anyComponentStyle', maximumWarning: '6kb', maximumError: '10kb' } ],
                      serviceWorker: true,
                      ngswConfigPath: 'apps/customer/ngsw-config.json'
                    },
                    securityless: {
                      fileReplacements: [
                        { replace: 'libs/shared/src/lib/shell/app.initializer.ts', with: 'libs/shared/src/lib/testing/mock.initializer.ts' },
                        { replace: 'libs/shared/src/lib/services/user.service.ts', with: 'libs/shared/src/lib/testing/mock.nokey.user.service.ts' }
                      ]
                    }
                  }
                },
                serve: {
                  builder: 'ngx-build-plus:dev-server',
                  options: { browserTarget: 'customer:build' },
                  configurations: {
                    production: { browserTarget: 'customer:build:production' },
                    securityless: { browserTarget: 'customer:build:securityless', extraWebpackConfig: './apps/customer-e2e/coverage.webpack.js' }
                  }
                },
                'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'customer:build' } },
                lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'apps/customer/src/**/*.ts', 'apps/customer/src/**/*.html' ] } },
                test: {
                  builder: '@angular-devkit/build-angular:karma',
                  options: {
                    main: 'apps/customer/src/test.ts',
                    tsConfig: 'apps/customer/tsconfig.spec.json',
                    karmaConfig: 'apps/customer/karma.conf.js',
                    polyfills: 'apps/customer/src/polyfills.ts',
                    styles: [],
                    scripts: [],
                    assets: [ 'apps/customer/src/manifest.webmanifest' ]
                  }
                }
              }
            },
            'customer-e2e': {
              root: 'apps/customer-e2e',
              sourceRoot: 'apps/customer-e2e/src',
              projectType: 'application',
              architect: {
                e2e: {
                  builder: '@nrwl/cypress:cypress',
                  options: { cypressConfig: 'apps/customer-e2e/cypress.json', tsConfig: 'apps/customer-e2e/tsconfig.e2e.json' },
                  configurations: { securityless: { devServerTarget: 'customer:serve:securityless' }, production: { devServerTarget: 'customer:serve:production' } }
                },
                lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'apps/customer-e2e/**/*.{js,ts}' ] } }
              }
            },
            carrier: {
              projectType: 'application',
              schematics: { '@nrwl/angular:component': { style: 'scss' } },
              root: 'apps/carrier',
              sourceRoot: 'apps/carrier/src',
              prefix: 'app',
              architect: {
                build: {
                  builder: '@angular-devkit/build-angular:browser',
                  options: {
                    outputPath: 'dist/apps/carrier',
                    index: 'apps/carrier/src/index.html',
                    main: 'apps/carrier/src/main.ts',
                    polyfills: 'apps/carrier/src/polyfills.ts',
                    tsConfig: 'apps/carrier/tsconfig.app.json',
                    aot: false,
                    assets: [
                      'apps/carrier/src/favicon.ico',
                      'apps/carrier/src/assets',
                      { glob: '**/*', input: 'node_modules/@jbhunt-ds/icons/dist/font', output: '/assets/fonts/jbh-icon' },
                      { glob: '**/*', input: 'node_modules/lib-platform-services/src', output: '/assets' },
                      'apps/carrier/src/manifest.webmanifest'
                    ],
                    styles: [
                      { input: 'node_modules/@jbhunt-ds/icons/dist/font/jbh-icons.scss', bundleName: 'jbhIcons' },
                      { input: 'node_modules/primeng/resources/primeng.min.css', bundleName: 'primengBase' },
                      { input: 'apps/carrier/src/styles.scss', bundleName: 'globals' }
                    ],
                    scripts: []
                  },
                  configurations: {
                    test: {
                      fileReplacements: [
                        { replace: 'libs/shared/src/lib/shell/app.initializer.ts', with: 'libs/shared/src/lib/testing/mock.initializer.ts' },
                        { replace: 'libs/shared/src/lib/services/user.service.ts', with: 'libs/shared/src/lib/testing/mock.nokey.user.service.ts' }
                      ]
                    },
                    production: {
                      fileReplacements: [ { replace: 'apps/carrier/src/environments/environment.ts', with: 'apps/carrier/src/environments/environment.prod.ts' } ],
                      outputHashing: 'all',
                      sourceMap: false,
                      extractCss: true,
                      namedChunks: false,
                      aot: true,
                      extractLicenses: true,
                      vendorChunk: false,
                      buildOptimizer: true,
                      budgets: [ { type: 'initial', maximumWarning: '2mb', maximumError: '5mb' }, { type: 'anyComponentStyle', maximumWarning: '6kb', maximumError: '10kb' } ],
                      serviceWorker: true,
                      ngswConfigPath: 'apps/carrier/ngsw-config.json'
                    }
                  }
                },
                serve: {
                  builder: '@angular-devkit/build-angular:dev-server',
                  options: { browserTarget: 'carrier:build' },
                  configurations: { production: { browserTarget: 'carrier:build:production' } }
                },
                'extract-i18n': { builder: '@angular-devkit/build-angular:extract-i18n', options: { browserTarget: 'carrier:build' } },
                lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'apps/carrier/src/**/*.ts', 'apps/carrier/src/**/*.html' ] } },
                test: {
                  builder: '@angular-devkit/build-angular:karma',
                  options: {
                    main: 'apps/carrier/src/test.ts',
                    tsConfig: 'apps/carrier/tsconfig.spec.json',
                    karmaConfig: 'apps/carrier/karma.conf.js',
                    polyfills: 'apps/carrier/src/polyfills.ts',
                    styles: [],
                    scripts: [],
                    assets: [ 'apps/carrier/src/manifest.webmanifest' ],
                    fileReplacements: [
                      { replace: 'libs/shared/src/lib/shell/app.initializer.ts', with: 'libs/shared/src/lib/testing/mock.initializer.ts' },
                      { replace: 'libs/shared/src/lib/services/user.service.ts', with: 'libs/shared/src/lib/testing/mock.nokey.user.service.ts' }
                    ]
                  }
                }
              }
            },
            'carrier-e2e': {
              root: 'apps/carrier-e2e',
              sourceRoot: 'apps/carrier-e2e/src',
              projectType: 'application',
              architect: {
                e2e: {
                  builder: '@nrwl/cypress:cypress',
                  options: { cypressConfig: 'apps/carrier-e2e/cypress.json', tsConfig: 'apps/carrier-e2e/tsconfig.e2e.json', devServerTarget: 'carrier:serve' },
                  configurations: { local: { devServerTarget: 'customer:serve' }, production: { devServerTarget: 'carrier:serve:production' } }
                },
                lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'apps/customer-e2e/**/*.{js,ts}' ] } }
              }
            },
            shared: {
              projectType: 'library',
              root: 'libs/shared',
              sourceRoot: 'libs/shared/src',
              prefix: 'app',
              architect: {
                lint: { builder: '@nrwl/linter:eslint', options: { lintFilePatterns: [ 'libs/shared/src/**/*.ts', 'libs/shared/src/**/*.html' ] } },
                test: {
                  builder: '@angular-devkit/build-angular:karma',
                  options: { main: 'libs/shared/src/test.ts', tsConfig: 'libs/shared/tsconfig.spec.json', karmaConfig: 'libs/shared/karma.conf.js' }
                }
              },
              schematics: { '@nrwl/angular:component': { styleext: 'scss' } }
            }
          },
          cli: { defaultCollection: '@nrwl/angular' },
          schematics: {
            '@nrwl/angular': { application: { linter: 'eslint' }, library: { linter: 'eslint' }, 'storybook-configuration': { linter: 'eslint' } },
            '@nrwl/angular:application': { unitTestRunner: 'karma', e2eTestRunner: 'cypress' },
            '@nrwl/angular:library': { unitTestRunner: 'karma' },
            '@nrwl/angular:component': { style: 'scss' }
          },
          defaultProject: 'customer'
        },
        tsConfig: '{"compileOnSave":false,"compilerOptions":{"rootDir":".","sourceMap":true,"declaration":false,"moduleResolution":"node","emitDecoratorMetadata":true,"experimentalDecorators":true,"importHelpers":true,"target":"es2015","module":"esnext","typeRoots":["node_modules/@types"],"lib":["es2019","ES2020.Promise","dom"],"skipLibCheck":true,"skipDefaultLibCheck":true,"baseUrl":".","paths":{"@pricing/shared*":["./libs/shared/src/lib*"],"@library*":["./libs/shared/src/lib*"],"@customer*":["./apps/customer/src/app*"],"@testing*":["./libs/shared/src/lib/testing*"]},"types":["jasmine","node"]},"angularCompilerOptions":{"fullTemplateTypeCheck":true,"strictInjectionParameters":true},"exclude":["node_modules","tmp","./libs/shared/src/lib/testing*","./apps/customer/src/environments/environment.prod.ts"],"files":["apps/customer/src/test.ts","apps/customer/src/polyfills.ts","apps/carrier/src/test.ts","apps/carrier/src/polyfills.ts","libs/shared/src/test.ts"],"include":["apps/customer/**/*.spec.ts","apps/customer/**/*.d.ts","apps/carrier/**/*.spec.ts","apps/carrier/**/*.d.ts","libs/shared/**/*.spec.ts","libs/shared/**/*.d.ts"]}',
        polyfill: {
          path: '<homeDir>/Projects/app_pricing_ui/wallaby-polyfills.js',
          code: "require('<homeDir>/Projects/app_pricing_ui/node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/jit-polyfills.js');\n" +
            "require('<homeDir>/Projects/app_pricing_ui/apps/customer/src/polyfills.ts');"
        },
        main: [
          {
            path: '<homeDir>/Projects/app_pricing_ui/apps/customer/src/test.ts',
            code: '// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n' +
              '\n' +
              "import 'core-js/es7/reflect';\n" +
              "import 'zone.js/dist/zone';\n" +
              "import 'zone.js/dist/zone-testing';\n" +
              'import {\n' +
              '  BrowserDynamicTestingModule,\n' +
              '  platformBrowserDynamicTesting,\n' +
              "} from '@angular/platform-browser-dynamic/testing';\n" +
              "import { getTestBed } from '@angular/core/testing';\n" +
              "import { loadTranslations } from '@angular/localize';\n" +
              '\n' +
              '// eslint-disable-next-line\n' +
              'declare const require: any;\n' +
              '\n' +
              '// Load `$localize` onto the global scope.\n' +
              "import '@angular/localize/init';\n" +
              "import translations from '../../../messages.en';\n" +
              '\n' +
              '// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n' +
              'loadTranslations(translations);\n' +
              '\n' +
              '// First, initialize the Angular testing environment.\n' +
              'getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());\n' +
              '\n' +
              '// Then we find all the tests.\n' +
              '// eslint-disable-next-line\n' +
              '\n' +
              '\n' +
              '// And load the modules.\n' +
              '// eslint-disable-next-line\n' +
              '\n'
          },
          {
            path: '<homeDir>/Projects/app_pricing_ui/apps/carrier/src/test.ts',
            code: '// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n' +
              '\n' +
              "import 'core-js/es7/reflect';\n" +
              '\n' +
              '\n' +
              '\n' +
              '\n' +
              "import { loadTranslations } from '@angular/localize';\n" +
              '\n' +
              '// eslint-disable-next-line\n' +
              '\n' +
              '\n' +
              '// Load `$localize` onto the global scope.\n' +
              "import '@angular/localize/init';\n" +
              "import translations from '../../../messages.en';\n" +
              '\n' +
              '// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n' +
              'loadTranslations(translations);\n' +
              '\n' +
              '// First, initialize the Angular testing environment.\n' +
              '\n' +
              '\n' +
              '// Then we find all the tests.\n' +
              '// eslint-disable-next-line\n' +
              '\n' +
              '\n' +
              '// And load the modules.\n' +
              '// eslint-disable-next-line\n' +
              '\n'
          },
          {
            path: '<homeDir>/Projects/app_pricing_ui/libs/shared/src/test.ts',
            code: '// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n' +
              '\n' +
              "import 'core-js/es7/reflect';\n" +
              '\n' +
              '\n' +
              '\n' +
              '\n' +
              "import { loadTranslations } from '@angular/localize';\n" +
              '\n' +
              '// eslint-disable-next-line\n' +
              '\n' +
              '\n' +
              '// Load `$localize` onto the global scope.\n' +
              "import '@angular/localize/init';\n" +
              "import translations from '../../../messages.en';\n" +
              '\n' +
              '// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n' +
              'loadTranslations(translations);\n' +
              '\n' +
              '// First, initialize the Angular testing environment.\n' +
              '\n' +
              '\n' +
              '// Then we find all the tests.\n' +
              '// eslint-disable-next-line\n' +
              '\n' +
              '\n' +
              '// And load the modules.\n' +
              '// eslint-disable-next-line\n' +
              '\n'
          }
        ]
      }
    },
    testFramework: { version: '[email protected]', configurator: '[email protected]', reporter: '[email protected]', starter: '[email protected]', autoDetected: true },
    env: { kind: 'chrome', type: 'browser', params: {}, viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    addModifiedTestFileToExclusiveTestRun: true,
    compilers: {},
    preprocessors: {},
    maxConsoleMessagesPerTest: 100,
    autoConsoleLog: true,
    delays: { run: 0, edit: 100, update: 0 },
    workers: { initial: 0, regular: 0, recycle: false },
    teardown: undefined,
    hints: {
      ignoreCoverage: '__REGEXP /ignore coverage|istanbul ignore/',
      ignoreCoverageForFile: '__REGEXP /ignore file coverage/',
      commentAutoLog: '?',
      testFileSelection: { include: '__REGEXP /file\\.only/', exclude: '__REGEXP /file\\.skip/' }
    },
    automaticTestFileSelection: true,
    runSelectedTestsOnly: false,
    mapConsoleMessagesStackTrace: false,
    extensions: {},
    reportUnhandledPromises: false,
    throwOnBeforeUnload: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: true,
    configCode: '// eslint-disable-next-line prefer-arrow/prefer-arrow-functions,no-unused-vars\n' +
      'module.exports = function (wallaby) {\n' +
      '  return {\n' +
      '    autoDetect: true,\n' +
      '    files: [\n' +
      "      'libs/shared/src/**/*.ts',\n" +
      "      'apps/carrier/src/**/*.ts',\n" +
      "      'apps/customer/src/**/*.ts',\n" +
      "      { pattern: 'libs/shared/src/**/*spec.ts', ignore: true },\n" +
      "      { pattern: 'apps/carrier/src/**/*spec.ts', ignore: true },\n" +
      "      { pattern: 'apps/customer/src/**/*spec.ts', ignore: true },\n" +
      '    ],\n' +
      '\n' +
      '    tests: [\n' +
      "      'libs/shared/src/**/*spec.ts',\n" +
      "      'apps/carrier/src/**/*spec.ts',\n" +
      "      'apps/customer/src/**/*spec.ts',\n" +
      '    ],\n' +
      '  };\n' +
      '};\n'
  },
  packageJSON: {
    dependencies: {
      '@angular/animations': '9.1.0',
      '@angular/cdk': '^8.2.3',
      '@angular/cli': '^9.1.0',
      '@angular/common': '9.1.0',
      '@angular/compiler': '9.1.0',
      '@angular/core': '9.1.0',
      '@angular/forms': '9.1.0',
      '@angular/localize': '9.1.0',
      '@angular/platform-browser': '9.1.0',
      '@angular/platform-browser-dynamic': '9.1.0',
      '@angular/pwa': '^0.901.15',
      '@angular/router': '9.1.0',
      '@angular/service-worker': '9.1.0',
      '@azure/storage-blob': '^10.3.0',
      '@fullcalendar/core': '^5.6.0',
      '@jbhunt-ds/primeng-theme': '6.5.0',
      '@ngrx/effects': '^9.2.1',
      '@ngrx/entity': '^9.2.1',
      '@ngrx/router-store': '^9.2.1',
      '@ngrx/schematics': '^9.2.1',
      '@ngrx/store': '^9.2.1',
      '@ngrx/store-devtools': '^9.2.1',
      '@nrwl/angular': '9.8.0',
      '@schematics/angular': '^12.1.1',
      '@types/lodash': '^4.14.149',
      '@types/rox-browser': '^5.0.1',
      'babel-polyfill': '^6.26.0',
      'chart.js': '^2.8.0',
      'classlist.js': '^1.1.20150312',
      'core-js': '^2.5.4',
      'editor.js': '^0.1.0',
      'file-saver': '^1.3.8',
      'http-status-codes': '^1.4.0',
      immer: '^6.0.3',
      'keycloak-angular': '^7.1.0',
      'keycloak-js': '^9.0.0',
      'lib-platform-components': '8.0.15',
      'lib-platform-services': '8.0.13',
      lodash: '^4.17.15',
      mammoth: '^1.4.9',
      moment: '^2.24.0',
      'moment-range': '^4.0.2',
      'moment-timezone': '^0.5.28',
      'ng-lint-staged': '^0.1.6',
      'ng2-currency-mask': '^5.3.1',
      'ng2-pdf-viewer': '6.4.1',
      'ngx-bootstrap': '^5.6.1',
      'ngx-cacheable': '^1.4.1',
      'ngx-drag-scroll': '^7.3.4',
      'ngx-hotjar': '^0.0.5',
      'ngx-perfect-scrollbar': '^7.2.1',
      'ngx-quill': '^7.3.4',
      'postcss-custom-properties': '^9.1.1',
      primeflex: '^1.0.0',
      primeng: '^9.1.0',
      quill: '^1.3.7',
      'rox-browser': '^5.0.0',
      rxjs: '6.5.5',
      tslib: '^1.10.0',
      underscore: '^1.9.1',
      uuid: '^3.4.0',
      xlsx: '^0.15.6',
      'zone.js': '^0.9.1'
    },
    devDependencies: {
      '@angular-builders/custom-webpack': '9.2.0',
      '@angular-devkit/build-angular': '0.901.0',
      '@angular-eslint/builder': '^12.3.1',
      '@angular-eslint/eslint-plugin': '12.3.1',
      '@angular-eslint/eslint-plugin-template': '12.3.1',
      '@angular-eslint/template-parser': '12.3.1',
      '@angular/compiler-cli': '9.1.0',
      '@angular/language-service': '9.1.0',
      '@angularclass/hmr': '^2.1.3',
      '@babel/compat-data': '7.8.0',
      '@babel/core': '^7.6.4',
      '@cypress/code-coverage': '^3.9.10',
      '@istanbuljs/nyc-config-typescript': '^1.0.1',
      '@jbhunt/mc2ng': '^0.3.0',
      '@nrwl/cli': '12.0.7',
      '@nrwl/cypress': '12.0.7',
      '@nrwl/eslint-plugin-nx': '12.0.7',
      '@nrwl/linter': '12.0.7',
      '@nrwl/tao': '12.0.7',
      '@nrwl/workspace': '12.0.7',
      '@types/file-saver': '^2.0.3',
      '@types/jasmine': '~3.8.1',
      '@types/jasminewd2': '^2.0.10',
      '@types/moment': '^2.13.0',
      '@types/moment-timezone': '~0.5.30',
      '@types/node': '~16.4.0',
      '@types/uuid': '^8.3.1',
      '@typescript-eslint/eslint-plugin': '^4.28.4',
      '@typescript-eslint/eslint-plugin-tslint': '^4.28.4',
      '@typescript-eslint/parser': '^4.28.4',
      '@typescript-eslint/typescript-estree': '^4.28.4',
      'babel-loader': '^8.0.6',
      buffer: '^5.4.3',
      codelyzer: '6.0.1',
      cypress: '^8.2.0',
      'cypress-file-upload': '^4.1.1',
      dotenv: '6.2.0',
      eslint: '^7.31.0',
      'eslint-config-prettier': '8.3.0',
      'eslint-import-resolver-typescript': '^2.4.0',
      'eslint-import-resolver-webpack': '^0.13.1',
      'eslint-plugin-cypress': '^2.11.3',
      'eslint-plugin-i18next': '^5.1.2',
      'eslint-plugin-jasmine': '^4.1.2',
      'eslint-plugin-jsdoc': '^35.5.1',
      'eslint-plugin-prefer-arrow': '^1.2.3',
      'eslint-plugin-prettier': '^3.4.0',
      'eslint-plugin-sort-imports-es6-autofix': '^0.6.0',
      htmlhint: '^0.15.1',
      'istanbul-instrumenter-loader': '^3.0.1',
      'istanbul-lib-coverage': '^3.0.0',
      'jasmine-core': '~2.99.1',
      'jasmine-spec-reporter': '5.0.2',
      karma: '~4.0.0',
      'karma-chrome-launcher': '3.1.0',
      'karma-coverage': '^2.0.1',
      'karma-coverage-istanbul-reporter': '3.0.3',
      'karma-jasmine': '~1.1.2',
      'karma-jasmine-html-reporter': '^0.2.2',
      'lint-staged': '^10.5.4',
      'ng-mocks': '^8.1.0',
      'ngx-build-plus': '^9.0.6',
      npm: '~6.10.0',
      nyc: '15.1.0',
      prettier: '^2.3.2',
      'prettier-eslint-cli': '^5.0.1',
      process: '^0.11.10',
      protractor: '7.0.0',
      'simple-git-hooks': '^2.2.0',
      'source-map-support': '^0.5.19',
      stylelint: '^13.13.1',
      'stylelint-config-prettier': '^8.0.2',
      'stylelint-config-sass-guidelines': '^8.0.0',
      'stylelint-config-standard-scss': '^1.1.0',
      'stylelint-no-unused-selectors': '^1.0.39',
      'stylelint-order': '^4.1.0',
      'ts-node': '~7.0.0',
      tslint: '^5.20.1',
      'tslint-config-airbnb': '^5.11.2',
      'tslint-config-prettier': '^1.18.0',
      'tslint-jasmine-rules': '^1.6.0',
      'tslint-lines-between-class-members': '^1.3.6',
      typescript: '3.8.3',
      url: '^0.11.0'
    }
  },
  fs: { numberOfFiles: 2644 },
  debug: [
    '2021-10-19T22:03:10.325Z angular/cli config Detected Angular CLI.\n',
    '2021-10-19T22:03:11.864Z angular/cli karma workspace config Using virtual <homeDir>/Projects/app_pricing_ui/apps/customer/src/test.ts.\n',
    '2021-10-19T22:03:11.864Z angular/cli karma workspace config Using virtual <homeDir>/Projects/app_pricing_ui/apps/carrier/src/test.ts.\n',
    '2021-10-19T22:03:11.865Z angular/cli karma workspace config Using virtual <homeDir>/Projects/app_pricing_ui/libs/shared/src/test.ts.\n',
    '2021-10-19T22:03:11.865Z angular/cli karma workspace config Using virtual <homeDir>/Projects/app_pricing_ui/tsconfig.wallaby.spec.json.\n',
    '2021-10-19T22:03:12.310Z project Wallaby Node version: v14.15.1\n',
    '2021-10-19T22:03:12.310Z project Wallaby config: <homeDir>/Projects/app_pricing_ui/wallaby.js\n',
    '2021-10-19T22:03:14.071Z fs File system scan has finished by timeout\n',
    '2021-10-19T22:03:14.097Z project File cache: <homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/projects/120c797d14e10244\n',
    '2021-10-19T22:03:14.180Z uiService Listening port 51235\n',
    '2021-10-19T22:03:14.185Z project package.json file change detected, invalidating local cache\n',
    '2021-10-19T22:03:14.304Z workers Parallelism for initial run: 14, for regular run: 7\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #0\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #1\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #2\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #3\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #4\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #5\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #6\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #7\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #8\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #9\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #10\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #11\n',
    '2021-10-19T22:03:14.304Z workers Starting run worker instance #12\n',
    '2021-10-19T22:03:14.305Z workers Starting run worker instance #13\n',
    '2021-10-19T22:03:14.307Z workers Web server is listening at 57996\n',
    '2021-10-19T22:03:14.314Z project Stopping process pool\n',
    '2021-10-19T22:03:14.314Z project File cache is up-to-date, starting full test run\n',
    '2021-10-19T22:03:14.323Z project Running postprocessor\n',
    '2021-10-19T22:03:14.372Z postprocessor Processing started.\n',
    '2021-10-19T22:03:14.372Z postprocessor Initializing.\n',
    '2021-10-19T22:03:14.374Z postprocessor Initializing entry.\n',
    '2021-10-19T22:03:14.375Z postprocessor Sanitizing configuration.\n',
    '2021-10-19T22:03:14.375Z postprocessor Adjusting configuration.\n',
    '2021-10-19T22:03:14.376Z postprocessor Creating compiler.\n',
    '2021-10-19T22:03:14.454Z postprocessor Customizing compiler.\n',
    '2021-10-19T22:03:14.454Z postprocessor Compilation started.\n',
    '2021-10-19T22:03:15.168Z workers Started run worker instance (immediate) #0\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #1\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #2\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #3\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #4\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #5\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #6\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #7\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #8\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #9\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #10\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #11\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #12\n',
    '2021-10-19T22:03:15.169Z workers Started run worker instance (immediate) #13\n',
    '2021-10-19T22:03:18.365Z project Error: ./src/test.ts\n' +
      'Module build failed (from wallaby-loader):\n' +
      'Error: Failed to instrument apps/customer/src/test.ts\n' +
      '  12 | \n' +
      '  13 | // eslint-disable-next-line\n' +
      '> 14 | declare const require: any;\n' +
      '     |         ^ SyntaxError: Unexpected token (14:8)\n' +
      '  15 | \n' +
      '  16 | // Load `$localize` onto the global scope.\n' +
      "  17 | import '@angular/localize/init';\n" +
      '    at Object.formatInstrumentationError (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:29:27714)\n' +
      '    at Object.n (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:22:18067)\n' +
      '    at Object.t.exports.single (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:22:19005)\n' +
      ' @ <homeDir>/Projects/app_pricing_ui/wallaby-webpack-entry.js 2:0-73\n' +
      '    at t.<anonymous> (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:22:8155)\n' +
      '    at n (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:22:4546)\n' +
      '    at Object.next (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:22:3841)\n' +
      '    at o (<homeDir>/Library/Caches/JetBrains/IntelliJIdea2021.3/wallaby/wallaby/server.js:22:3600)\n' +
      '    at runMicrotasks (<anonymous>)\n' +
      '    at processTicksAndRejections (internal/process/task_queues.js:93:5)\n',
    '2021-10-19T22:03:18.366Z project Test run finished\n',
    '2021-10-19T22:03:18.366Z project Test run data re-queued\n'
  ]
}
@smcenlly
Copy link
Member

I can see from your diagnostics report that you are explicitly setting the files and tests sections for your project:

wallaby.js configuration

module.exports = function (wallaby) {return {autoDetect: true,files: ['libs/shared/src/**/*.ts','apps/carrier/src/**/*.ts','apps/customer/src/**/*.ts',{ pattern: 'libs/shared/src/**/*spec.ts', ignore: true },{ pattern: 'apps/carrier/src/**/*spec.ts', ignore: true },{ pattern: 'apps/customer/src/**/*spec.ts', ignore: true },], 
 
    tests: ['libs/shared/src/**/*spec.ts','apps/carrier/src/**/*spec.ts','apps/customer/src/**/*spec.ts',],};};

Is there a reason for you doing this? This may be the cause of your problem. For projects that use automatic configuration, your files and tests properties will be automatically set based on your project’s configuration. There are two ways to configure different or additional files and tests when using automatic configuration:

Modify automatic configuration files and/or tests
You may modify the files and/or tests properties that are automatically set by Wallaby’s automatic configuration by creating a files or tests property with an object containing an override function:

module.exports = () => ({
  autoDetect: true,

  // modify `files` automatic configuration settings
  files: {
    override: (filePatterns) => {
      // TODO: modify `filePatterns` array as required
      return filePatterns;
    }
  },

  // modify `tests` automatic configuration settings
  tests: {
    override: (testPatterns) => {
      // TODO: modify `testPatterns` array as required
      return testPatterns;
    }
  }
});

Replace automatic configuration files and/or tests
You may force Wallaby to completely ignore the files and/or tests properties that are automatically set by Wallaby’s automatic configuration by creating a files or tests property with an array of patterns.

module.exports = () => ({
  autoDetect: true,

  // modify `files` automatic configuration settings
  files: [
    "src/**/*.js",
  ],

  // modify `tests` automatic configuration settings
  tests: [
    "test/**/*.spec.js",
  ]
});

In your case, you are completely replacing the configuration which may be missing some files that Wallaby needs to successfully run your tests.

Please try removing the files and tests sections of your configuration to see if that fixes the problem. If you still need overrides, you may also try to modify the configuration instead of replacing it.

@sdrowe
Copy link
Author

sdrowe commented Oct 19, 2021 via email

@smcenlly
Copy link
Member

One more thing I wanted to check... can you please check that the tests are passing when run from the command line with ng test?

@sdrowe
Copy link
Author

sdrowe commented Oct 20, 2021 via email

@NikGovorov
Copy link
Member

Hi @sdrowe,

Thanks for reporting the issue. It is fixed and the fix is published in the latest core version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants