wallabyjs / public

Repository for Wallaby.js questions and issues
http://wallabyjs.com
760 stars 45 forks source link

wallaby does not show coverage for .ts files whereas jest does #2666

Closed ramaghanta closed 3 years ago

ramaghanta commented 3 years ago

Issue description or question

Using wallaby core v1.0.1047 does not show coverage for .ts files whereas jest does

Wallaby diagnostics report

{
  editorVersion: 'WebStorm 2020.3.2',
  pluginVersion: '1.0.213',
  editorType: 'IntelliJ',
  osVersion: 'darwin 20.3.0',
  nodeVersion: 'v14.16.0',
  coreVersion: '1.0.1047',
  checksum: 'ZDc0YmJmYmNjMzg4YTRmMjA1NGE1ZWQxZTVlODE4ZmYsMTY0NTIyODgwMDAwMCww',
  config: {
    diagnostics: {
      jest: {
        config: {
          configs: [
            {
              automock: false,
              cache: true,
              cacheDirectory: '/private/var/folders/zg/ny6nt3jj7710j41np1hgtyxw0000gn/T/jest_dx',
              clearMocks: false,
              coveragePathIgnorePatterns: [ '/node_modules/' ],
              cwd: '<homeDir>/WebstormProjects/nacha',
              dependencyExtractor: undefined,
              detectLeaks: undefined,
              detectOpenHandles: undefined,
              displayName: undefined,
              errorOnDeprecated: false,
              extraGlobals: [],
              filter: undefined,
              forceCoverageMatch: [],
              globalSetup: undefined,
              globalTeardown: undefined,
              globals: {},
              haste: { computeSha1: false, throwOnModuleCollision: false },
              injectGlobals: true,
              moduleDirectories: [ 'node_modules' ],
              moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ],
              moduleLoader: undefined,
              moduleNameMapper: [],
              modulePathIgnorePatterns: [],
              modulePaths: undefined,
              name: '7cef87b701745ed5fb86308fb2f1a51b',
              prettierPath: 'prettier',
              resetMocks: false,
              resetModules: false,
              resolver: undefined,
              restoreMocks: false,
              rootDir: '<homeDir>/WebstormProjects/nacha',
              roots: [ '<homeDir>/WebstormProjects/nacha' ],
              runner: 'jest-runner',
              setupFiles: [ '<homeDir>/WebstormProjects/nacha/node_modules/dotenv/config.js' ],
              setupFilesAfterEnv: [],
              skipFilter: false,
              skipNodeResolution: undefined,
              slowTestThreshold: 5,
              snapshotResolver: undefined,
              snapshotSerializers: [],
              testEnvironment: '<homeDir>/WebstormProjects/nacha/node_modules/jest-environment-node/build/index.js',
              testEnvironmentOptions: {},
              testLocationInResults: false,
              testMatch: [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)' ],
              testPathIgnorePatterns: [
                '<homeDir>/WebstormProjects/nacha/build/',
                '<homeDir>/WebstormProjects/nacha/node_modules/',
                '<homeDir>/WebstormProjects/nacha/src/api/v1/util.test.ts'
              ],
              testRegex: [],
              testRunner: '<homeDir>/WebstormProjects/nacha/node_modules/jest-jasmine2/build/index.js',
              testURL: 'http://localhost',
              timers: 'real',
              transform: [ [ '^.+\\.tsx?$', '<homeDir>/WebstormProjects/nacha/node_modules/ts-jest/dist/index.js', {} ] ],
              transformIgnorePatterns: [ '/node_modules/', '\\.pnp\\.[^\\/]+$' ],
              unmockedModulePathPatterns: undefined,
              watchPathIgnorePatterns: []
            }
          ],
          globalConfig: {
            bail: 0,
            changedFilesWithAncestor: false,
            changedSince: undefined,
            collectCoverage: false,
            collectCoverageFrom: [],
            collectCoverageOnlyFrom: undefined,
            coverageDirectory: '<homeDir>/WebstormProjects/nacha/coverage',
            coverageProvider: 'babel',
            coverageReporters: [ 'json', 'text', 'lcov', 'clover' ],
            coverageThreshold: undefined,
            detectLeaks: undefined,
            detectOpenHandles: undefined,
            enabledTestsMap: undefined,
            errorOnDeprecated: false,
            expand: false,
            filter: undefined,
            findRelatedTests: false,
            forceExit: false,
            globalSetup: undefined,
            globalTeardown: undefined,
            json: false,
            lastCommit: false,
            listTests: undefined,
            logHeapUsage: false,
            maxConcurrency: 5,
            maxWorkers: 19,
            noSCM: undefined,
            noStackTrace: false,
            nonFlagArgs: undefined,
            notify: false,
            notifyMode: 'failure-change',
            onlyChanged: false,
            onlyFailures: false,
            outputFile: undefined,
            passWithNoTests: undefined,
            projects: [],
            replname: undefined,
            reporters: undefined,
            rootDir: '<homeDir>/WebstormProjects/nacha',
            runTestsByPath: false,
            silent: undefined,
            skipFilter: false,
            testFailureExitCode: 1,
            testNamePattern: undefined,
            testPathPattern: '',
            testResultsProcessor: undefined,
            testSequencer: '<homeDir>/WebstormProjects/nacha/node_modules/@jest/test-sequencer/build/index.js',
            testTimeout: 120000,
            updateSnapshot: 'new',
            useStderr: false,
            verbose: undefined,
            watch: false,
            watchAll: false,
            watchPlugins: undefined,
            watchman: true
          },
          hasDeprecationWarnings: false,
          wallaby: {
            roots: [],
            watchPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\..+/', '\\./build/', '\\./node_modules/', '\\./src/api/v1/util.test.ts' ],
            testPathIgnorePatterns: [ '/node_modules/', '\\./dist/|\\./build/|\\./coverage/|/\\..+/', '\\./build/', '\\./node_modules/', '\\./src/api/v1/util.test.ts' ],
            testMatch: [ '**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)' ],
            testRegex: []
          }
        }
      }
    },
    testFramework: { version: 'jest@24.8.0', configurator: 'jest@24.8.0', reporter: 'jest@24.8.0', starter: 'jest@24.8.0', autoDetected: true },
    filesWithCoverageCalculated: [],
    filesWithNoCoverageCalculated: [],
    globalSetup: false,
    micromatch: true,
    files: [
      { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true },
      { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\..+\//, ignore: true, trigger: true, load: true },
      { pattern: '\\./build/', regexp: /\.\/build\//, ignore: true, trigger: true, load: true },
      { pattern: '\\./node_modules/', regexp: /\.\/node_modules\//, ignore: true, trigger: true, load: true },
      { pattern: '\\./src/api/v1/util.test.ts', regexp: /\.\/src\/api\/v1\/util.test.ts/, ignore: true, trigger: true, load: true },
      { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: '**/__tests__/**/*.[jt]s?(x)', ignore: true, trigger: true, load: true },
      { pattern: '**/?(*.)+(spec|test).[tj]s?(x)', ignore: true, trigger: true, load: true }
    ],
    tests: [
      { pattern: '/node_modules/', regexp: /\/node_modules\//, ignore: true, trigger: true, load: true, test: true },
      { pattern: '\\./dist/|\\./build/|\\./coverage/|/\\..+/', regexp: /\.\/dist\/|\.\/build\/|\.\/coverage\/|\/\..+\//, ignore: true, trigger: true, load: true, test: true },
      { pattern: '\\./build/', regexp: /\.\/build\//, ignore: true, trigger: true, load: true, test: true },
      { pattern: '\\./node_modules/', regexp: /\.\/node_modules\//, ignore: true, trigger: true, load: true, test: true },
      { pattern: '\\./src/api/v1/util.test.ts', regexp: /\.\/src\/api\/v1\/util.test.ts/, ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/__tests__/**/*.[jt]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 2 },
      { pattern: '**/?(*.)+(spec|test).[tj]s?(x)', ignore: false, trigger: true, load: true, test: true, order: 3 }
    ],
    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,
    extensions: {},
    env: {
      type: 'node',
      params: {},
      runner: '<homeDir>/.nvm/versions/node/v14.16.0/bin/node',
      viewportSize: { width: 800, height: 600 },
      options: { width: 800, height: 600 },
      bundle: true
    },
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: true,
    configCode: 'auto.detect#-637157294'
  },
  packageJSON: {
    dependencies: {
      '@checkdigit/aws': '^1.10.1',
      '@checkdigit/hash': '^0.0.2',
      '@checkdigit/serve-runtime': '^2.1.1',
      '@koa/router': '^10.0.0',
      debug: '^4.3.1',
      'http-status-codes': '^2.1.4',
      koa: '^2.13.1'
    },
    devDependencies: {
      '@checkdigit/amazon': '1.0.2',
      '@checkdigit/aws-nock': '3.2.4',
      '@checkdigit/eslint-config': '^3.4.1',
      '@checkdigit/fixture': '1.1.8',
      '@checkdigit/ledger': '^1.4.2',
      '@checkdigit/link': '^1.3.1',
      '@checkdigit/openapi': '^1.0.37',
      '@checkdigit/prettier-config': '^1.0.1',
      '@checkdigit/sentinel': '^1.9.0',
      '@checkdigit/typescript-config': '^1.0.5',
      '@types/debug': '^4.1.5',
      '@types/jest': '^26.0.20',
      '@types/koa': '^2.13.1',
      '@types/koa__router': '^8.0.4',
      '@types/node': '^14.14.35',
      '@types/uuid': '^8.3.0',
      coveralls: '^3.1.0',
      dotenv: '^8.2.0',
      eslint: '^7.22.0',
      jest: '^26.6.3',
      prettier: '^2.2.1',
      rimraf: '^3.0.2',
      'ts-jest': '^26.5.3',
      typescript: '^4.2.3',
      'typescript-json-schema': '^0.50.0',
      uuid: '^8.3.2'
    }
  },
  fs: { numberOfFiles: 52 },
  debug: [
    '2021-03-16T17:50:08.264Z angular/cli config Angular CLI not found.\n',
    '2021-03-16T17:50:08.326Z jest/config Detected Jest.\n',
    '2021-03-16T17:50:08.326Z jest/config Configured Jest.\n',
    '2021-03-16T17:50:08.327Z project Wallaby Node version: v14.16.0\n',
    '2021-03-16T17:50:08.327Z project Wallaby config: <homeDir>/WebstormProjects/nacha/auto.detect\n',
    '2021-03-16T17:50:08.384Z project File cache: <homeDir>/Library/Caches/JetBrains/WebStorm2020.3/wallaby/projects/9c3fad0a11a34aaa\n',
    '2021-03-16T17:50:08.440Z uiService Listening port 51235\n',
    '2021-03-16T17:50:08.447Z project package.json file change detected, invalidating local cache\n',
    '2021-03-16T17:50:08.458Z workers Parallelism for initial run: 18, for regular run: 9\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #0\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #1\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #2\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #3\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #4\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #5\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #6\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #7\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #8\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #9\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #10\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #11\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #12\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #13\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #14\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #15\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #16\n',
    '2021-03-16T17:50:08.458Z workers Starting run worker instance #17\n',
    '2021-03-16T17:50:08.459Z workers Web server is listening at 60120\n',
    '2021-03-16T17:50:08.459Z project File cache requires some updates, waiting required files from IDE\n',
    '2021-03-16T17:50:08.579Z project Stopping process pool\n',
    '2021-03-16T17:50:08.582Z project Test run started; run priority: 3\n',
    '2021-03-16T17:50:08.583Z project Running all tests\n',
    '2021-03-16T17:50:08.585Z workers Starting test run, priority: 3\n',
    '2021-03-16T17:50:08.585Z workers Distributing tests between 18 workers\n',
    '2021-03-16T17:50:08.586Z workers Running tests in parallel\n',
    '2021-03-16T17:50:08.586Z nodeRunner Starting sandbox [worker #0, session #wddpy]\n',
    '2021-03-16T17:50:08.586Z nodeRunner Starting sandbox [worker #1, session #0iuwa]\n',
    '2021-03-16T17:50:08.586Z nodeRunner Starting sandbox [worker #2, session #wmjl9]\n',
    '2021-03-16T17:50:08.586Z nodeRunner Starting sandbox [worker #3, session #b56fq]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Starting sandbox [worker #4, session #8oybr]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Starting sandbox [worker #5, session #74wer]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Starting sandbox [worker #6, session #giscp]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Starting sandbox [worker #7, session #ppgny]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Starting sandbox [worker #8, session #siq57]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Starting sandbox [worker #9, session #ru60u]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #0, session #wddpy]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #1, session #0iuwa]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #2, session #wmjl9]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #3, session #b56fq]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #4, session #8oybr]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #5, session #74wer]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #6, session #giscp]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #7, session #ppgny]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #8, session #siq57]\n',
    '2021-03-16T17:50:08.587Z nodeRunner Preparing sandbox [worker #9, session #ru60u]\n',
    '2021-03-16T17:50:08.684Z workers Started run worker instance (delayed) #0\n',
    '2021-03-16T17:50:08.684Z nodeRunner Prepared sandbox [worker #0, session #wddpy]\n',
    '2021-03-16T17:50:08.684Z workers [worker #0, session #wddpy] Running tests in sandbox\n',
    '2021-03-16T17:50:08.686Z workers Started run worker instance (delayed) #1\n',
    '2021-03-16T17:50:08.686Z nodeRunner Prepared sandbox [worker #1, session #0iuwa]\n',
    '2021-03-16T17:50:08.686Z workers [worker #1, session #0iuwa] Running tests in sandbox\n',
    '2021-03-16T17:50:08.687Z workers Started run worker instance (delayed) #2\n',
    '2021-03-16T17:50:08.687Z nodeRunner Prepared sandbox [worker #2, session #wmjl9]\n',
    '2021-03-16T17:50:08.687Z workers [worker #2, session #wmjl9] Running tests in sandbox\n',
    '2021-03-16T17:50:08.701Z workers Started run worker instance (delayed) #4\n',
    '2021-03-16T17:50:08.701Z nodeRunner Prepared sandbox [worker #4, session #8oybr]\n',
    '2021-03-16T17:50:08.701Z workers [worker #4, session #8oybr] Running tests in sandbox\n',
    '2021-03-16T17:50:08.708Z workers Started run worker instance (delayed) #5\n',
    '2021-03-16T17:50:08.708Z nodeRunner Prepared sandbox [worker #5, session #74wer]\n',
    '2021-03-16T17:50:08.708Z workers [worker #5, session #74wer] Running tests in sandbox\n',
    '2021-03-16T17:50:08.715Z workers Started run worker instance (delayed) #3\n',
    '2021-03-16T17:50:08.715Z nodeRunner Prepared sandbox [worker #3, session #b56fq]\n',
    '2021-03-16T17:50:08.715Z workers [worker #3, session #b56fq] Running tests in sandbox\n',
    '2021-03-16T17:50:08.727Z workers Started run worker instance (delayed) #6\n',
    '2021-03-16T17:50:08.727Z nodeRunner Prepared sandbox [worker #6, session #giscp]\n',
    '2021-03-16T17:50:08.727Z workers [worker #6, session #giscp] Running tests in sandbox\n',
    '2021-03-16T17:50:08.728Z workers Started run worker instance (delayed) #7\n',
    '2021-03-16T17:50:08.728Z nodeRunner Prepared sandbox [worker #7, session #ppgny]\n',
    '2021-03-16T17:50:08.728Z workers [worker #7, session #ppgny] Running tests in sandbox\n',
    '2021-03-16T17:50:08.743Z workers Started run worker instance (delayed) #8\n',
    '2021-03-16T17:50:08.743Z nodeRunner Prepared sandbox [worker #8, session #siq57]\n',
    '2021-03-16T17:50:08.743Z workers [worker #8, session #siq57] Running tests in sandbox\n',
    '2021-03-16T17:50:08.757Z workers Started run worker instance (delayed) #9\n',
    '2021-03-16T17:50:08.757Z nodeRunner Prepared sandbox [worker #9, session #ru60u]\n',
    '2021-03-16T17:50:08.757Z workers [worker #9, session #ru60u] Running tests in sandbox\n',
    '2021-03-16T17:50:08.771Z workers Started run worker instance (delayed) #11\n',
    '2021-03-16T17:50:08.789Z workers Started run worker instance (delayed) #10\n',
    '2021-03-16T17:50:08.791Z workers Started run worker instance (delayed) #12\n',
    '2021-03-16T17:50:08.798Z workers Started run worker instance (delayed) #14\n',
    '2021-03-16T17:50:08.799Z workers Started run worker instance (delayed) #16\n',
    '2021-03-16T17:50:08.803Z workers Started run worker instance (delayed) #13\n',
    '2021-03-16T17:50:08.804Z workers Started run worker instance (delayed) #15\n',
    '2021-03-16T17:50:08.805Z workers Started run worker instance (delayed) #17\n',
    '2021-03-16T17:50:18.874Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.956Z\n',
    '2021-03-16T17:50:18.885Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.959Z\n',
    '2021-03-16T17:50:18.953Z workers [b56fq] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:18.954Z workers [b56fq] Test executed: returns 404 when base path is requested\n',
    '2021-03-16T17:50:18.954Z workers [siq57] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:18.954Z workers [b56fq] Test executed: returns 404 when base path with trailing / is requested\n',
    '2021-03-16T17:50:18.954Z workers [siq57] Test executed: returns current server time\n',
    '2021-03-16T17:50:18.954Z workers [b56fq] Test executed: returns 404 when an invalid endpoint is requested\n',
    '2021-03-16T17:50:18.959Z workers [siq57] Run 1 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:18.959Z workers [b56fq] Run 3 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:18.960Z workers Jest Test Run Complete: 2021-03-16T17:50:18.909Z\n',
    '2021-03-16T17:50:18.960Z workers Jest Test Run Complete: 2021-03-16T17:50:18.909Z\n',
    '2021-03-16T17:50:18.961Z workers [siq57] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:18.961Z workers [b56fq] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:23.411Z workers Some long running code has been detected: one of your files is taking more than 5000ms to execute.\n' +
      'Execution of the following files has started but has not finished:\n' +
      '- src/api/v1/payment-request-file-put.spec.ts\n' +
      'Try commenting out the test or excluding the test file from the `tests` list in your wallaby config,\n' +
      'and restarting wallaby to make sure that it is this test/file causing the issue and not something else.\n' +
      'Pinging test runner sandbox...\n',
    '2021-03-16T17:50:24.326Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.953Z\n',
    '2021-03-16T17:50:24.342Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.954Z\n',
    '2021-03-16T17:50:24.374Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.955Z\n',
    '2021-03-16T17:50:24.409Z workers [wmjl9] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.423Z workers [0iuwa] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.442Z workers [wddpy] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.454Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.955Z\n',
    '2021-03-16T17:50:24.461Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.955Z\n',
    '2021-03-16T17:50:24.490Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.953Z\n',
    '2021-03-16T17:50:24.526Z workers [8oybr] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.530Z workers [ru60u] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.553Z workers [74wer] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.554Z workers Sandbox is responsive. The issue may be asynchronous in nature (for example, a missing callback).\n',
    '2021-03-16T17:50:24.638Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.959Z\n',
    '2021-03-16T17:50:24.692Z workers [giscp] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:24.715Z workers Scheduling Jest Test Run: 2021-03-16T17:50:09.955Z\n',
    '2021-03-16T17:50:24.773Z workers [ppgny] Loaded unknown number of test(s)\n',
    '2021-03-16T17:50:27.360Z workers [wmjl9] Test executed: empty public keys, bad request\n',
    '2021-03-16T17:50:27.406Z workers [0iuwa] Test executed: returns a 404 status code if keys are not found\n',
    '2021-03-16T17:50:27.432Z workers [wddpy] Test executed: payment not found\n',
    '2021-03-16T17:50:27.469Z workers [8oybr] Test executed: zero amount, bad request\n',
    '2021-03-16T17:50:27.477Z workers [ru60u] Test executed: zero amount, bad request\n',
    '2021-03-16T17:50:27.505Z workers [wmjl9] Test executed: returns a 200 status code and encryption keys \n',
    '2021-03-16T17:50:27.513Z workers [wmjl9] Run 2 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:27.514Z workers Jest Test Run Complete: 2021-03-16T17:50:27.504Z\n',
    '2021-03-16T17:50:27.515Z workers [wmjl9] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:27.536Z workers [8oybr] Test executed: payment source not found, bad request\n',
    '2021-03-16T17:50:27.541Z workers [ru60u] Test executed: payment source not found, bad request\n',
    '2021-03-16T17:50:27.559Z workers [74wer] Test executed: empty request body, bad request\n',
    '2021-03-16T17:50:27.585Z workers [74wer] Test executed: from greater than to, bad request\n',
    '2021-03-16T17:50:27.585Z workers [74wer] Test executed: create a payment request JSONL file\n',
    '2021-03-16T17:50:27.590Z workers [74wer] Run 3 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:27.590Z workers Jest Test Run Complete: 2021-03-16T17:50:27.584Z\n',
    '2021-03-16T17:50:27.590Z workers [74wer] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:27.656Z workers [0iuwa] Test executed: returns encryption keys and 200 status code\n',
    '2021-03-16T17:50:27.661Z workers [0iuwa] Run 2 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:27.661Z workers Jest Test Run Complete: 2021-03-16T17:50:27.655Z\n',
    '2021-03-16T17:50:27.662Z workers [0iuwa] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:27.703Z workers [giscp] Test executed: returns 404 when payment source is not found\n',
    '2021-03-16T17:50:27.708Z workers [giscp] Test executed: returns 400 if at parameter is in the future\n',
    '2021-03-16T17:50:27.719Z workers [ppgny] Test executed: invalid key id\n',
    '2021-03-16T17:50:28.004Z workers [8oybr] Test executed: target account not found, bad request\n',
    '2021-03-16T17:50:28.020Z workers [ru60u] Test executed: target account not found, bad request\n',
    '2021-03-16T17:50:28.108Z workers [ppgny] Test executed: decryption error, bad request\n',
    '2021-03-16T17:50:28.133Z workers [giscp] Test executed: creates and retrieve a payment source, 200 with correct headers\n',
    '2021-03-16T17:50:28.165Z workers [wddpy] Test executed: cancel payment, idempotent\n',
    '2021-03-16T17:50:28.170Z workers [wddpy] Run 2 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:28.170Z workers Jest Test Run Complete: 2021-03-16T17:50:28.164Z\n',
    '2021-03-16T17:50:28.171Z workers [wddpy] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:28.295Z workers [ppgny] Test executed: invalid account name, bad request\n',
    '2021-03-16T17:50:28.469Z workers [ru60u] Test executed: non USD target account, bad request\n',
    '2021-03-16T17:50:28.485Z workers [8oybr] Test executed: non USD target account, bad request\n',
    '2021-03-16T17:50:28.519Z workers [ppgny] Test executed: invalid account number, bad request\n',
    '2021-03-16T17:50:28.711Z workers [giscp] Test executed: creates and retrieve a payment source, check firehose data\n',
    '2021-03-16T17:50:28.717Z workers [giscp] Run 4 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:28.717Z workers Jest Test Run Complete: 2021-03-16T17:50:28.711Z\n',
    '2021-03-16T17:50:28.718Z workers [giscp] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:28.977Z workers [ppgny] Test executed: invalid routing number, bad request\n',
    '2021-03-16T17:50:28.990Z workers [ru60u] Test executed: initiate request payment, different data, Conflict\n',
    '2021-03-16T17:50:29.103Z workers [8oybr] Test executed: initiate pay payment, different data, Conflict\n',
    '2021-03-16T17:50:29.384Z workers [ppgny] Test executed: same paymentsourceId, different payload, create simultaneously, return conflict\n',
    '2021-03-16T17:50:29.524Z workers [ru60u] Test executed: initiate request payment, idempotent\n',
    '2021-03-16T17:50:29.758Z workers [8oybr] Test executed: initiate pay payment, idempotent\n',
    '2021-03-16T17:50:29.771Z workers [ppgny] Test executed: creates a payment source and returns correct headers\n',
    '2021-03-16T17:50:30.123Z workers [ru60u] Test executed: initiate request payment simultaneously, idempotent\n',
    '2021-03-16T17:50:30.129Z workers [ru60u] Run 7 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:30.129Z workers Jest Test Run Complete: 2021-03-16T17:50:30.122Z\n',
    '2021-03-16T17:50:30.130Z workers [ru60u] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:30.149Z workers [ppgny] Test executed: create payment sources simultaneously and returns correct headers\n',
    '2021-03-16T17:50:30.330Z workers [8oybr] Test executed: initiate pay payment simultaneously, idempotent\n',
    '2021-03-16T17:50:30.336Z workers [8oybr] Run 7 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:30.336Z workers Jest Test Run Complete: 2021-03-16T17:50:30.329Z\n',
    '2021-03-16T17:50:30.337Z workers [8oybr] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:30.805Z workers [ppgny] Test executed: create payment source, same secret keys, idempotent, success and returns correct headers\n',
    '2021-03-16T17:50:31.295Z workers [ppgny] Test executed: create payment source, different secret keys, idempotent, success and returns correct headers\n',
    '2021-03-16T17:50:31.299Z workers [ppgny] Run 10 test(s), skipped 0 test(s)\n',
    '2021-03-16T17:50:31.300Z workers Jest Test Run Complete: 2021-03-16T17:50:31.294Z\n',
    '2021-03-16T17:50:31.301Z workers [ppgny] Sandbox is responsive, closing it\n',
    '2021-03-16T17:50:31.301Z workers Merging parallel test run results\n',
    '2021-03-16T17:50:31.307Z project Test run finished\n',
    '2021-03-16T17:50:31.307Z project Processed console.log entries\n',
    '2021-03-16T17:50:31.308Z project Processed loading sequences\n',
    '2021-03-16T17:50:31.308Z project Processed executed tests\n',
    '2021-03-16T17:50:31.312Z project Processed code coverage\n',
    '2021-03-16T17:50:31.346Z project Test run result processed and sent to IDE\n'
  ]
}
smcenlly commented 3 years ago

Could you please provide:

  1. Your tsconfig.json (and any .spec.json, overrides etc. that may be used for tests), and
  2. Your jest config?
ramaghanta commented 3 years ago

@smcenlly thank you for the quick response. Here is my tsconfig.json.

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es2019",
    "lib": ["esnext", "dom"],
    "sourceMap": true,
    "outDir": "build",
    "declaration": true,
    "removeComments": false,
    "rootDir": "src",
    "noLib": false,
    "noEmitOnError": false,
    "skipLibCheck": true,
    "strict": true,
    "preserveConstEnums": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "alwaysStrict": true,
    "importsNotUsedAsValues": "error",
    "noFallthroughCasesInSwitch": true,
    "forceConsistentCasingInFileNames": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "noUncheckedIndexedAccess": true
  },
  "exclude": [
    "node_modules",
    "build",
    "dist"
  ]
}

I'm using the Automatic Configuration for running wallaby, but for Jest command line I'm using

"jest": {
    "collectCoverage": true,
    "preset": "ts-jest",
    "testEnvironment": "node",
    "setupFiles": [
      "<rootDir>/node_modules/dotenv/config.js"
    ],
    "testPathIgnorePatterns": [
      "<rootDir>/build/",
      "<rootDir>/node_modules/",
      "<rootDir>/src/api/v1/util.test.ts"
    ],
    "testTimeout": 120000
  }
ramaghanta commented 3 years ago

@smcenlly I noticed https://github.com/wallabyjs/public/issues/2661, but for VSCode. Could these be related? And some of my tests take longer than jest's default 5000ms. Could that be the reason? If so, I'm guessing I cannot use the automatic wallaby configuration and should have a wallaby configuration with an explicit jest timeout setting?

smcenlly commented 3 years ago

@smcenlly I noticed #2661, but for VSCode. Could these be related?

No - these aren't related.

I'm taking a look at the moment, will reply when I have an update (or else require more info).

smcenlly commented 3 years ago

It seems to be working for us with your configuration and sample TypeScript files. Would you mind trying the sample repo that we created to see if it works for you?

In a temp directory:

  1. git clone https://github.com/wallabyjs/wallaby-2666
  2. cd wallaby-2666
  3. npm install
  4. Open Project in WebStorm and create a Wallaby Run Configuration with automatic configuration
  5. Start Wallaby
  6. Check indicators appear on src/api/v1/payment-request-file-put.spec.ts and src/api/v1/payment-request-file-put.ts.

If this is working for you but your project isn't, could you try removing your node_modules folder and re-creating it to see if that helps? If that still doesn't help, could you try to update the sample repo with some of your config/code that we may be missing to try duplicate the problem?

Would you also mind sharing a screenshot of where the coverage indicators are not appearing for you?

BTW: the Some long running code has been detected message is simply a warning and does not indicate an actual error.

ramaghanta commented 3 years ago

Hi @smcenlly, wallaby works like a charm in the sample repo you have created.

We identified the issue to be the presence of the build folder, which is causing the green indicators not to show up in the .ts files. Here are some screenshots to show what the issue is:

Spec File: image

With build folder: image

Without build folder: image

About what's creating the build folder for us, it's tsc from my npm test script, tsc && jest && npm run prettier && npm run lint. The workaround for us is to modify the test script as tsc --noEmit && jest && npm run prettier && npm run lint.

smcenlly commented 3 years ago

From what I can see in the code, I suspect that:

import { createFixture } from '@checkdigit/serve';

is using your build folder instead of your src folder when the build folder exists. This looks like a private package so unfortunately we can't inspect the code to confirm. If this is the case then you will have to adjust the code there to fix the problem. Maybe switch on process.env.NODE_ENV === 'test'?

If you are modifying your test script to not emit JavaScript (i.e. tsc --noEmit) then I assume you will never have a build folder (as you're not building on your local machine) and therefore don't have a Wallaby problem either? Please confirm that everything's working for you now and I'll close this issue.

ramaghanta commented 3 years ago

@smcenlly your suspicion is spot on. Our internal infrastructure module (@checkdigit/serve) is the culprit here. It's using the build folder if it exists. Modifying my test script to tsc --noEmit will not create the build folder and hence no issues with running wallaby. Thank you so much for the help. You can close this issue.