wallabyjs / public

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

Updated to 1.0.923, Wallaby no longer running tests #2474

Closed fieldr92 closed 4 years ago

fieldr92 commented 4 years ago

Issue description or question

Since updating Wallaby to 1.0.923 (VSCode on Windows), tests no longer are running and errors appearing where previously they weren't.

Tests running and passing on the command line without issue. Also working fine on Wallaby yesterday before the update.

Diagnostics report below, any help would be much appreciated!

Wallaby diagnostics report

{
  editorVersion: '1.46.1',
  pluginVersion: '1.0.216',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.17134',
  nodeVersion: 'v12.15.0',
  coreVersion: '1.0.923',
  config: {
    diagnostics: {
      jest: {
        config: {
          configs: [
            {
              automock: false,
              browser: false,
              cache: true,
              cacheDirectory: 'C:\\Users\\Ralph.field\\AppData\\Local\\Temp\\jest',
              clearMocks: true,
              coveragePathIgnorePatterns: [ '\\\\node_modules\\\\' ],
              cwd: 'C:\\Repos\\doc-centre\\doc-centre-web',
              dependencyExtractor: null,
              detectLeaks: undefined,
              detectOpenHandles: undefined,
              displayName: undefined,
              errorOnDeprecated: false,
              extraGlobals: undefined,
              filter: null,
              forceCoverageMatch: [],
              globalSetup: null,
              globalTeardown: null,
              globals: { appInsights: { trackEvent: [Function: trackEvent] } },
              haste: { computeSha1: false, providesModuleNodeModules: [], throwOnModuleCollision: false },
              moduleDirectories: [ 'node_modules' ],
              moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ],
              moduleLoader: undefined,
              moduleNameMapper: [ [ '\\.(css|less|scss|sss|styl)$', 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-css-modules' ] ],
              modulePathIgnorePatterns: [],
              modulePaths: undefined,
              name: '8ad500f252a423fc13d96d25c6fc473e',
              prettierPath: 'prettier',
              resetMocks: true,
              resetModules: true,
              resolver: null,
              restoreMocks: true,
              rootDir: 'C:\\Repos\\doc-centre\\doc-centre-web',
              roots: [ 'C:\\Repos\\doc-centre\\doc-centre-web' ],
              runner: 'jest-runner',
              setupFiles: [],
              setupFilesAfterEnv: [],
              skipFilter: false,
              skipNodeResolution: undefined,
              snapshotResolver: undefined,
              snapshotSerializers: [],
              testEnvironment: 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-environment-jsdom\\build\\index.js',
              testEnvironmentOptions: {},
              testLocationInResults: false,
              testMatch: [ '**/*.test.js' ],
              testPathIgnorePatterns: [ 'C:\\\\Repos\\\\doc-centre\\\\doc-centre-web\\\\src\\\\automation\\\\' ],
              testRegex: [],
              testRunner: 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-jasmine2\\build\\index.js',
              testURL: 'http://localhost/',
              timers: 'real',
              transform: [ [ '^.+\\.[jt]sx?$', 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\babel-jest\\build\\index.js' ] ],
              transformIgnorePatterns: [ '\\\\node_modules\\\\' ],
              unmockedModulePathPatterns: undefined,
              watchPathIgnorePatterns: []
            }
          ],
          globalConfig: {
            bail: 0,
            changedFilesWithAncestor: false,
            changedSince: undefined,
            collectCoverage: false,
            collectCoverageFrom: null,
            collectCoverageOnlyFrom: undefined,
            coverageDirectory: 'C:\\Repos\\doc-centre\\doc-centre-web\\stats',
            coverageReporters: [ 'json', 'lcov', 'text', 'html' ],
            coverageThreshold: { global: { branches: 100, functions: 100, lines: 100, statements: 100 } },
            detectLeaks: undefined,
            detectOpenHandles: undefined,
            enabledTestsMap: undefined,
            errorOnDeprecated: false,
            expand: false,
            extraGlobals: undefined,
            filter: null,
            findRelatedTests: undefined,
            forceExit: undefined,
            globalSetup: null,
            globalTeardown: null,
            json: false,
            lastCommit: undefined,
            listTests: undefined,
            logHeapUsage: undefined,
            maxConcurrency: 5,
            maxWorkers: 7,
            noSCM: undefined,
            noStackTrace: false,
            nonFlagArgs: undefined,
            notify: false,
            notifyMode: 'failure-change',
            onlyChanged: undefined,
            onlyFailures: undefined,
            outputFile: undefined,
            passWithNoTests: undefined,
            projects: null,
            replname: undefined,
            reporters: undefined,
            rootDir: 'C:\\Repos\\doc-centre\\doc-centre-web',
            runTestsByPath: false,
            silent: undefined,
            skipFilter: false,
            testFailureExitCode: 1,
            testNamePattern: undefined,
            testPathPattern: '',
            testResultsProcessor: null,
            testSequencer: 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\@jest\\test-sequencer\\build\\index.js',
            testTimeout: undefined,
            updateSnapshot: 'new',
            useStderr: false,
            verbose: true,
            watch: false,
            watchAll: undefined,
            watchPlugins: undefined,
            watchman: true
          },
          hasDeprecationWarnings: false,
          wallaby: {
            roots: [],
            watchPathIgnorePatterns: [
              '\\\\node_modules\\\\',
              '\\.\\\\dist\\\\|\\.\\\\build\\\\|\\.\\\\coverage\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
              '\\\\src\\\\automation\\\\'
            ],
            testPathIgnorePatterns: [
              '\\\\node_modules\\\\',
              '\\.\\\\dist\\\\|\\.\\\\build\\\\|\\.\\\\coverage\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
              '\\\\src\\\\automation\\\\'
            ],
            testMatch: [ '**/*.test.js' ],
            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: [],
    globalSetup: false,
    micromatch: true,
    files: [
      { pattern: '\\\\node_modules\\\\', regexp: /\\node_modules\\/, ignore: true, trigger: true, load: true },
      {
        pattern: '\\.\\\\dist\\\\|\\.\\\\build\\\\|\\.\\\\coverage\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
        regexp: /\.\\dist\\|\.\\build\\|\.\\coverage\\|\\\.cache\\|\\\.idea\\|\\\.vscode\\|\\\.git\\|\\\.gitlab\\/,
        ignore: true,
        trigger: true,
        load: true
      },
      { pattern: '\\\\src\\\\automation\\\\', regexp: /\\src\\automation\\/, ignore: true, trigger: true, load: true },
      { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: '**/*.test.js', 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\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
        regexp: /\.\\dist\\|\.\\build\\|\.\\coverage\\|\\\.cache\\|\\\.idea\\|\\\.vscode\\|\\\.git\\|\\\.gitlab\\/,
        ignore: true,
        trigger: true,
        load: true,
        test: true
      },
      { pattern: '\\\\src\\\\automation\\\\', regexp: /\\src\\automation\\/, ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/*.test.js', ignore: false, trigger: true, load: true, test: true, order: 2 }
    ],
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    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: 'C:\\Program Files\\nodejs\\node.exe', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: true,
    configCode: 'auto.detect#-2018820085'
  },
  packageJSON: {
    dependencies: {
      '@babel/core': '^7.10.2',
      '@babel/plugin-proposal-optional-chaining': '^7.10.1',
      '@babel/runtime': '^7.10.2',
      '@babel/runtime-corejs2': '^7.10.2',
      '@zeit/next-css': '^1.0.1',
      '@zeit/next-sass': '^1.0.1',
      applicationinsights: '^1.7.6',
      'body-parser': '^1.19.0',
      'browser-detect': '^0.2.28',
      'cookie-parser': '^1.4.5',
      cors: '^2.8.5',
      dotenv: '^8.2.0',
      express: '^4.17.1',
      'express-async-errors': '^3.1.1',
      'file-loader': '^4.3.0',
      'form-data': '^3.0.0',
      ip6addr: '^0.2.3',
      'isomorphic-fetch': '^2.2.1',
      'js-cookie': '^2.2.1',
      'launchdarkly-node-server-sdk': '^5.13.1',
      'ldclient-node': '^5.8.0',
      multer: '^1.4.2',
      next: '^9.4.4',
      'nextjs-fonts': '^0.22.0',
      'node-cache': '^4.2.1',
      'node-fetch': '^2.6.0',
      'node-sass': '^4.14.1',
      react: '^16.13.1',
      'react-dom': '^16.13.1',
      'react-dropzone': '^11.0.1',
      'react-helmet': '^5.2.1',
      'react-sweet-progress': '^1.1.2',
      'sass-loader': '^8.0.2',
      'url-loader': '^2.3.0',
      uuid: '^3.4.0',
      'webpack-filter-warnings-plugin': '^1.2.1'
    },
    devDependencies: {
      '@testing-library/react': '^9.3.2',
      '@types/jest': '^24.0.23',
      '@types/node': '^13.13.12',
      '@types/react': '^16.9.37',
      '@types/react-dom': '^16.9.8',
      'babel-eslint': '^10.0.3',
      enzyme: '^3.10.0',
      'enzyme-adapter-react-16': '^1.15.1',
      eslint: '^6.6.0',
      'eslint-config-airbnb': '^18.0.1',
      'eslint-config-airbnb-standard': '^3.0.1',
      'eslint-config-node': '^4.1.0',
      'eslint-config-prettier': '^6.5.0',
      'eslint-plugin-import': '^2.21.2',
      'eslint-plugin-jsx-a11y': '^6.2.3',
      'eslint-plugin-node': '^10.0.0',
      'eslint-plugin-prettier': '^3.1.4',
      'eslint-plugin-react': '^7.20.0',
      'eslint-plugin-simple-import-sort': '^4.0.0',
      'eslint-plugin-sort-destructure-keys': '^1.3.3',
      'eslint-plugin-sort-keys-fix': '^1.1.1',
      husky: '^3.0.9',
      jest: '^24.9.0',
      'jest-css-modules': '^2.1.0',
      'jest-fetch-mock': '^2.1.2',
      'jest-puppeteer': '^4.3.0',
      prettier: '^1.19.1',
      puppeteer: '^1.20.0'
    }
  },
  fs: { numberOfFiles: 3320 },
  debug: [
    '2020-07-08T11:27:04.963Z angular/cli config Angular CLI not found.\n',
    '2020-07-08T11:27:05.172Z jest/config Detected Jest.\n',
    '2020-07-08T11:27:05.173Z jest/config Configured Jest.\n',
    '2020-07-08T11:27:05.174Z project Wallaby Node version: v12.15.0\n',
    '2020-07-08T11:27:05.174Z project Wallaby config: C:\\Repos\\doc-centre\\doc-centre-web\\auto.detect\n',
    '2020-07-08T11:27:12.062Z project File cache: C:\\Users\\Ralph.field\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.216\\projects\\f9e02998f33d7b35\n',
    '2020-07-08T11:27:12.103Z uiService Listening port 51235\n',
    '2020-07-08T11:27:12.117Z project package.json file change detected, invalidating local cache\n',
    '2020-07-08T11:27:12.443Z workers Parallelism for initial run: 6, for regular run: 3\n',
    '2020-07-08T11:27:12.443Z workers Starting run worker instance #0\n',
    '2020-07-08T11:27:12.444Z workers Starting run worker instance #1\n',
    '2020-07-08T11:27:12.444Z workers Starting run worker instance #2\n',
    '2020-07-08T11:27:12.444Z workers Starting run worker instance #3\n',
    '2020-07-08T11:27:12.444Z workers Starting run worker instance #4\n',
    '2020-07-08T11:27:12.444Z workers Starting run worker instance #5\n',
    '2020-07-08T11:27:12.444Z workers Web server is listening at 58283\n',
    '2020-07-08T11:27:12.445Z project File cache requires some updates, waiting required files from IDE\n',
    '2020-07-08T11:27:12.761Z project Stopping process pool\n',
    '2020-07-08T11:27:12.769Z project Test run started; run priority: 3\n',
    '2020-07-08T11:27:12.786Z project Running all tests\n',
    '2020-07-08T11:27:12.893Z workers Starting test run, priority: 3\n',
    '2020-07-08T11:27:12.893Z workers Distributing tests between 6 workers\n',
    '2020-07-08T11:27:12.895Z workers Running tests in parallel\n',
    '2020-07-08T11:27:12.896Z nodeRunner Starting sandbox [worker #0, session #n7y43]\n',
    '2020-07-08T11:27:12.896Z nodeRunner Starting sandbox [worker #1, session #kmkzs]\n',
    '2020-07-08T11:27:12.896Z nodeRunner Starting sandbox [worker #2, session #s90wm]\n',
    '2020-07-08T11:27:12.896Z nodeRunner Starting sandbox [worker #3, session #usck0]\n',
    '2020-07-08T11:27:12.896Z nodeRunner Starting sandbox [worker #4, session #o883w]\n',
    '2020-07-08T11:27:12.896Z nodeRunner Starting sandbox [worker #5, session #x3sym]\n',
    '2020-07-08T11:27:12.897Z nodeRunner Preparing sandbox [worker #0, session #n7y43]\n',
    '2020-07-08T11:27:12.897Z nodeRunner Preparing sandbox [worker #1, session #kmkzs]\n',
    '2020-07-08T11:27:12.897Z nodeRunner Preparing sandbox [worker #2, session #s90wm]\n',
    '2020-07-08T11:27:12.897Z nodeRunner Preparing sandbox [worker #3, session #usck0]\n',
    '2020-07-08T11:27:12.897Z nodeRunner Preparing sandbox [worker #4, session #o883w]\n',
    '2020-07-08T11:27:12.897Z nodeRunner Preparing sandbox [worker #5, session #x3sym]\n',
    '2020-07-08T11:27:12.916Z workers Started run worker instance (delayed) #0\n',
    '2020-07-08T11:27:12.917Z nodeRunner Prepared sandbox [worker #0, session #n7y43]\n',
    '2020-07-08T11:27:12.917Z workers [worker #0, session #n7y43] Running tests in sandbox\n',
    '2020-07-08T11:27:12.935Z workers Started run worker instance (delayed) #2\n',
    '2020-07-08T11:27:12.936Z nodeRunner Prepared sandbox [worker #2, session #s90wm]\n',
    '2020-07-08T11:27:12.936Z workers [worker #2, session #s90wm] Running tests in sandbox\n',
    '2020-07-08T11:27:12.958Z workers Started run worker instance (delayed) #3\n',
    '2020-07-08T11:27:12.958Z nodeRunner Prepared sandbox [worker #3, session #usck0]\n',
    '2020-07-08T11:27:12.958Z workers [worker #3, session #usck0] Running tests in sandbox\n',
    '2020-07-08T11:27:12.968Z workers Started run worker instance (delayed) #1\n',
    '2020-07-08T11:27:12.968Z nodeRunner Prepared sandbox [worker #1, session #kmkzs]\n',
    '2020-07-08T11:27:12.968Z workers [worker #1, session #kmkzs] Running tests in sandbox\n',
    '2020-07-08T11:27:12.988Z workers Started run worker instance (delayed) #4\n',
    '2020-07-08T11:27:12.989Z nodeRunner Prepared sandbox [worker #4, session #o883w]\n',
    '2020-07-08T11:27:12.989Z workers [worker #4, session #o883w] Running tests in sandbox\n',
    '2020-07-08T11:27:13.001Z workers Started run worker instance (delayed) #5\n',
    '2020-07-08T11:27:13.001Z nodeRunner Prepared sandbox [worker #5, session #x3sym]\n',
    '2020-07-08T11:27:13.001Z workers [worker #5, session #x3sym] Running tests in sandbox\n',
    "2020-07-08T11:27:28.817Z workers Sandbox (active) [usck0] error: Cannot read property 'json' of undefined\n",
    '2020-07-08T11:27:28.919Z workers [usck0] Run 0 test(s), skipped 0 test(s)\n',
    '2020-07-08T11:27:29.028Z workers Sandbox (active) [s90wm] error: C:\\Repos\\doc-centre\\\n',
    '2020-07-08T11:27:29.029Z workers Sandbox (active) [s90wm] error: doc-centre-web\\node_modules\\jest-runner\\build\\testWorker.js:121\r\n' +
      '  console.error(err.stack);\r\n' +
      '                    ^\r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'stack' of undefined\r\n",
    '2020-07-08T11:27:29.030Z workers Sandbox (active) [s90wm] error: t\n',
    '2020-07-08T11:27:29.031Z workers Sandbox (active) [s90wm] error: -\n',
    '2020-07-08T11:27:29.032Z workers Sandbox (active) [s90wm] error: r\n',
    '2020-07-08T11:27:29.032Z workers Sandbox (active) [s90wm] error: u\n',
    '2020-07-08T11:27:29.033Z workers Sandbox (active) [s90wm] error: n\n',
    '2020-07-08T11:27:29.033Z workers Sandbox (active) [s90wm] error: ner\\build\\testWorker.js:121:21)\r\n',
    '2020-07-08T11:27:29.034Z workers Sandbox (active) [s90wm] error: ts.js:228:7)\n',
    '2020-07-08T11:27:29.034Z workers Sandbox (active) [s90wm] error: \r\n',
    '2020-07-08T11:27:29.034Z workers Sandbox (active) [s90wm] error: ception (interna\n',
    '2020-07-08T11:27:29.035Z workers Sandbox (active) [s90wm] error: l\n',
    '2020-07-08T11:27:29.035Z workers Sandbox (active) [s90wm] error: /\n',
    '2020-07-08T11:27:29.036Z workers Sandbox (active) [s90wm] error: process/execution.js:150:25)\r\n\n',
    '2020-07-08T11:27:29.137Z workers [s90wm] Sandbox can not be pinged: not opened\n',
    '2020-07-08T11:27:29.137Z workers [s90wm] Sandbox is not responsive, recycling worker instance\n',
    '2020-07-08T11:27:29.137Z workers [s90wm] Sandbox closing error, not opened\n',
    '2020-07-08T11:27:29.138Z workers [s90wm] Run 0 test(s), skipped 0 test(s)\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: C:\\Repos\\doc-centre\\, stack: C:\\Repos\\doc-centre\\\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: doc-centre-web\\node_modules\\jest-runner\\build\\testWorker.js:121\r\n' +
      '  console.error(err.stack);\r\n' +
      '                    ^\r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'stack' of undefined\r, stack: doc-centre-web\\node_modules\\jest-runner\\build\\testWorker.js:121\r\n" +
      '  console.error(err.stack);\r\n' +
      '                    ^\r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'stack' of undefined\r\n" +
      '    at process.<anonymous> (C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jes\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: t, stack: t\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: -, stack: -\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: r, stack: r\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: u, stack: u\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: n, stack: n\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: ner\\build\\testWorker.js:121:21)\r, stack: ner\\build\\testWorker.js:121:21)\r\n    at process.emit (even\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: ts.js:228:7), stack: ts.js:228:7)\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: \r, stack: \r\n    at process._fatalEx\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: ception (interna, stack: ception (interna\n',
    '2020-07-08T11:27:29.139Z workers Failed to map the stack to user code, entry message: l, stack: l\n',
    '2020-07-08T11:27:29.140Z workers Failed to map the stack to user code, entry message: /, stack: /\n',
    '2020-07-08T11:27:29.140Z workers Failed to map the stack to user code, entry message: process/execution.js:150:25)\r\n, stack: process/execution.js:150:25)\r\n\n',
    "2020-07-08T11:27:29.318Z workers Sandbox (active) [x3sym] error: Cannot read property 'json' of undefined\n",
    '2020-07-08T11:27:29.339Z workers Sandbox (active) [kmkzs] error: C\n',
    '2020-07-08T11:27:29.339Z workers Sandbox (active) [kmkzs] error: :\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-runner\\build\\testWorker.js:121\r\n' +
      '  console.error(err.stack);\r\n' +
      '                    ^\r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'stack' of undefined\r\n",
    '2020-07-08T11:27:29.340Z workers Sandbox (active) [kmkzs] error: ner\\build\\testWorker.js:121:21)\r\n',
    '2020-07-08T11:27:29.419Z workers [x3sym] Run 0 test(s), skipped 0 test(s)\n',
    '2020-07-08T11:27:29.440Z workers [kmkzs] Sandbox can not be pinged: not opened\n',
    '2020-07-08T11:27:29.440Z workers [kmkzs] Sandbox is not responsive, recycling worker instance\n',
    '2020-07-08T11:27:29.440Z workers [kmkzs] Sandbox closing error, not opened\n',
    '2020-07-08T11:27:29.440Z workers [kmkzs] Run 0 test(s), skipped 0 test(s)\n',
    '2020-07-08T11:27:29.441Z workers Failed to map the stack to user code, entry message: C, stack: C\n',
    '2020-07-08T11:27:29.441Z workers Failed to map the stack to user code, entry message: :\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-runner\\build\\testWorker.js:121\r\n' +
      '  console.error(err.stack);\r\n' +
      '                    ^\r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'stack' of undefined\r, stack: :\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-runner\\build\\testWorker.js:121\r\n" +
      '  console.error(err.stack);\r\n' +
      '                    ^\r\n' +
      '\r\n' +
      "TypeError: Cannot read property 'stack' of undefined\r\n" +
      '    at process.<anonymous> (C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-run\n',
    '2020-07-08T11:27:29.441Z workers Failed to map the stack to user code, entry message: ner\\build\\testWorker.js:121:21)\r, stack: ner\\build\\testWorker.js:121:21)\r\n' +
      '    at process.emit (events.js:228:7)\r\n' +
      '    at process._fatalException (internal/process/execution.js:150:25)\r\n' +
      '\n',
    '2020-07-08T11:27:31.141Z workers [n7y43] Loaded unknown number of test(s)\n',
    '2020-07-08T11:27:31.666Z workers Sandbox (active) [o883w] error: true\n',
    '2020-07-08T11:27:31.767Z workers [o883w] Run 0 test(s), skipped 0 test(s)\n',
    '2020-07-08T11:27:34.466Z workers Sandbox (active) [n7y43] error: Your test suite must contain at least one test.\n',
    '2020-07-08T11:27:34.567Z workers [n7y43] Run 0 test(s), skipped 0 test(s)\n',
    '2020-07-08T11:27:35.920Z workers [usck0] Sandbox is not responsive, recycling worker instance\n',
    '2020-07-08T11:27:36.420Z workers [x3sym] Sandbox is not responsive, recycling worker instance\n',
    '2020-07-08T11:27:37.395Z workers [n7y43] Sandbox is responsive, closing it\n',
    '2020-07-08T11:27:38.770Z workers [o883w] Sandbox is not responsive, recycling worker instance\n',
    '2020-07-08T11:27:38.771Z workers Failed to map the stack to user code, entry message: true, stack: true\n',
    '2020-07-08T11:27:38.771Z workers Merging parallel test run results\n',
    '2020-07-08T11:27:38.771Z project Test run finished\n',
    '2020-07-08T11:27:38.772Z project Processed console.log entries\n',
    '2020-07-08T11:27:38.772Z project Processed loading sequences\n',
    '2020-07-08T11:27:38.772Z project Processed executed tests\n',
    '2020-07-08T11:27:38.785Z project Processed code coverage\n',
    '2020-07-08T11:27:38.815Z project Test run result processed and sent to IDE\n'
  ]
}
ArtemGovorov commented 4 years ago

Thanks for providing the report. Can you please also share your Jest config file?

fieldr92 commented 4 years ago

See below, thanks!

module.exports = {
  clearMocks: true,
  coverageDirectory: './stats/',
  coverageReporters: ['json', 'lcov', 'text', 'html'],
  coverageThreshold: {
    global: {
      branches: 100,
      functions: 100,
      lines: 100,
      statements: 100
    }
  },
  globals: {
    appInsights: { trackEvent: () => {} }
  },
  moduleNameMapper: {
    '\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules'
  },
  resetMocks: true,
  resetModules: true,
  restoreMocks: true,
  testMatch: ['**/*.test.js'],
  testPathIgnorePatterns: ['<rootDir>/src/automation/'],
  testURL: 'http://localhost/',
  verbose: true
};
ArtemGovorov commented 4 years ago

Not sure what is going on here yet, looks like the issue shows up before any of your tests run, but we have tried to create the sample repo no errors are showing up.

Can you please clone this sample repo https://github.com/ArtemGovorov/wallaby-2474, run npm i and run Wallaby on it to see if you're getting the same error? The repo has your package.json dependencies as is, and your Jest config as it. If the sample repo is working, can you please try deleting package-lock and node_modules folder in your project and reinstalling node modules to see if it helps?

fieldr92 commented 4 years ago

Thanks for looking into this so quickly and for getting a sample repo up. Your sample repo is working fine so I think it's something up with our tests or a syntax error somewhere.

I did delete the node_modules and package-lock.json which seems to have stopped the Cannot read property 'stack' of undefined error but now only 4 of our tests are running (should be >200).

Below is another diagnostics report, which doesn't seem to have anything wrong but wanted to ask if you can see anything? Am doubtful but thought I may as well ask!

{
  editorVersion: '1.46.1',
  pluginVersion: '1.0.216',
  editorType: 'VSCode',
  osVersion: 'win32 10.0.17134',
  nodeVersion: 'v12.15.0',
  coreVersion: '1.0.923',
  config: {
    diagnostics: {
      jest: {
        config: {
          configs: [
            {
              automock: false,
              browser: false,
              cache: true,
              cacheDirectory: 'C:\\Users\\Ralph.field\\AppData\\Local\\Temp\\jest',
              clearMocks: true,
              coveragePathIgnorePatterns: [ '\\\\node_modules\\\\' ],
              cwd: 'C:\\Repos\\doc-centre\\doc-centre-web',
              dependencyExtractor: null,
              detectLeaks: undefined,
              detectOpenHandles: undefined,
              displayName: undefined,
              errorOnDeprecated: false,
              extraGlobals: undefined,
              filter: null,
              forceCoverageMatch: [],
              globalSetup: null,
              globalTeardown: null,
              globals: { appInsights: { trackEvent: [Function: trackEvent] } },
              haste: { computeSha1: false, providesModuleNodeModules: [], throwOnModuleCollision: false },
              moduleDirectories: [ 'node_modules' ],
              moduleFileExtensions: [ 'js', 'json', 'jsx', 'ts', 'tsx', 'node' ],
              moduleLoader: undefined,
              moduleNameMapper: [ [ '\\.(css|less|scss|sss|styl)$', 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-css-modules' ] ],
              modulePathIgnorePatterns: [],
              modulePaths: undefined,
              name: '8ad500f252a423fc13d96d25c6fc473e',
              prettierPath: 'prettier',
              resetMocks: true,
              resetModules: true,
              resolver: null,
              restoreMocks: true,
              rootDir: 'C:\\Repos\\doc-centre\\doc-centre-web',
              roots: [ 'C:\\Repos\\doc-centre\\doc-centre-web' ],
              runner: 'jest-runner',
              setupFiles: [],
              setupFilesAfterEnv: [],
              skipFilter: false,
              skipNodeResolution: undefined,
              snapshotResolver: undefined,
              snapshotSerializers: [],
              testEnvironment: 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-environment-jsdom\\build\\index.js',
              testEnvironmentOptions: {},
              testLocationInResults: false,
              testMatch: [ '**/*.test.js' ],
              testPathIgnorePatterns: [ 'C:\\\\Repos\\\\doc-centre\\\\doc-centre-web\\\\src\\\\automation\\\\' ],
              testRegex: [],
              testRunner: 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\jest-jasmine2\\build\\index.js',
              testURL: 'http://localhost/',
              timers: 'real',
              transform: [ [ '^.+\\.[jt]sx?$', 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\babel-jest\\build\\index.js' ] ],
              transformIgnorePatterns: [ '\\\\node_modules\\\\' ],
              unmockedModulePathPatterns: undefined,
              watchPathIgnorePatterns: []
            }
          ],
          globalConfig: {
            bail: 0,
            changedFilesWithAncestor: false,
            changedSince: undefined,
            collectCoverage: false,
            collectCoverageFrom: null,
            collectCoverageOnlyFrom: undefined,
            coverageDirectory: 'C:\\Repos\\doc-centre\\doc-centre-web\\stats',
            coverageReporters: [ 'json', 'lcov', 'text', 'html' ],
            coverageThreshold: { global: { branches: 100, functions: 100, lines: 100, statements: 100 } },
            detectLeaks: undefined,
            detectOpenHandles: undefined,
            enabledTestsMap: undefined,
            errorOnDeprecated: false,
            expand: false,
            extraGlobals: undefined,
            filter: null,
            findRelatedTests: undefined,
            forceExit: undefined,
            globalSetup: null,
            globalTeardown: null,
            json: false,
            lastCommit: undefined,
            listTests: undefined,
            logHeapUsage: undefined,
            maxConcurrency: 5,
            maxWorkers: 7,
            noSCM: undefined,
            noStackTrace: false,
            nonFlagArgs: undefined,
            notify: false,
            notifyMode: 'failure-change',
            onlyChanged: undefined,
            onlyFailures: undefined,
            outputFile: undefined,
            passWithNoTests: undefined,
            projects: null,
            replname: undefined,
            reporters: undefined,
            rootDir: 'C:\\Repos\\doc-centre\\doc-centre-web',
            runTestsByPath: false,
            silent: undefined,
            skipFilter: false,
            testFailureExitCode: 1,
            testNamePattern: undefined,
            testPathPattern: '',
            testResultsProcessor: null,
            testSequencer: 'C:\\Repos\\doc-centre\\doc-centre-web\\node_modules\\@jest\\test-sequencer\\build\\index.js',
            testTimeout: undefined,
            updateSnapshot: 'new',
            useStderr: false,
            verbose: true,
            watch: false,
            watchAll: undefined,
            watchPlugins: undefined,
            watchman: true
          },
          hasDeprecationWarnings: false,
          wallaby: {
            roots: [],
            watchPathIgnorePatterns: [
              '\\\\node_modules\\\\',
              '\\.\\\\dist\\\\|\\.\\\\build\\\\|\\.\\\\coverage\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
              '\\\\src\\\\automation\\\\'
            ],
            testPathIgnorePatterns: [
              '\\\\node_modules\\\\',
              '\\.\\\\dist\\\\|\\.\\\\build\\\\|\\.\\\\coverage\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
              '\\\\src\\\\automation\\\\'
            ],
            testMatch: [ '**/*.test.js' ],
            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: [],
    globalSetup: false,
    micromatch: true,
    files: [
      { pattern: '\\\\node_modules\\\\', regexp: /\\node_modules\\/, ignore: true, trigger: true, load: true },
      {
        pattern: '\\.\\\\dist\\\\|\\.\\\\build\\\\|\\.\\\\coverage\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
        regexp: /\.\\dist\\|\.\\build\\|\.\\coverage\\|\\\.cache\\|\\\.idea\\|\\\.vscode\\|\\\.git\\|\\\.gitlab\\/,
        ignore: true,
        trigger: true,
        load: true
      },
      { pattern: '\\\\src\\\\automation\\\\', regexp: /\\src\\automation\\/, ignore: true, trigger: true, load: true },
      { pattern: '**/**', ignore: false, trigger: true, load: true, order: 1 },
      { pattern: '**/*.test.js', 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\\\\|\\\\\\.cache\\\\|\\\\\\.idea\\\\|\\\\\\.vscode\\\\|\\\\\\.git\\\\|\\\\\\.gitlab\\\\',
        regexp: /\.\\dist\\|\.\\build\\|\.\\coverage\\|\\\.cache\\|\\\.idea\\|\\\.vscode\\|\\\.git\\|\\\.gitlab\\/,
        ignore: true,
        trigger: true,
        load: true,
        test: true
      },
      { pattern: '\\\\src\\\\automation\\\\', regexp: /\\src\\automation\\/, ignore: true, trigger: true, load: true, test: true },
      { pattern: '**/*.test.js', ignore: false, trigger: true, load: true, test: true, order: 2 }
    ],
    filesWithNoCoverageCalculated: [],
    runAllTestsInAffectedTestFile: false,
    updateNoMoreThanOneSnapshotPerTestFileRun: false,
    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: 'C:\\Program Files\\nodejs\\node.exe', viewportSize: { width: 800, height: 600 }, options: { width: 800, height: 600 }, bundle: true },
    reportUnhandledPromises: true,
    slowTestThreshold: 75,
    lowCoverageThreshold: 80,
    loose: true,
    configCode: 'auto.detect#-2018820085'
  },
  packageJSON: {
    dependencies: {
      '@babel/core': '^7.10.2',
      '@babel/plugin-proposal-optional-chaining': '^7.10.1',
      '@babel/runtime': '^7.10.2',
      '@babel/runtime-corejs2': '^7.10.2',
      '@zeit/next-css': '^1.0.1',
      '@zeit/next-sass': '^1.0.1',
      applicationinsights: '^1.7.6',
      'body-parser': '^1.19.0',
      'browser-detect': '^0.2.28',
      'cookie-parser': '^1.4.5',
      cors: '^2.8.5',
      dotenv: '^8.2.0',
      express: '^4.17.1',
      'express-async-errors': '^3.1.1',
      'file-loader': '^4.3.0',
      'form-data': '^3.0.0',
      ip6addr: '^0.2.3',
      'isomorphic-fetch': '^2.2.1',
      'js-cookie': '^2.2.1',
      'launchdarkly-node-server-sdk': '^5.13.1',
      'ldclient-node': '^5.8.0',
      multer: '^1.4.2',
      next: '^9.4.4',
      'nextjs-fonts': '^0.22.0',
      'node-cache': '^4.2.1',
      'node-fetch': '^2.6.0',
      'node-sass': '^4.14.1',
      react: '^16.13.1',
      'react-dom': '^16.13.1',
      'react-dropzone': '^11.0.1',
      'react-helmet': '^5.2.1',
      'react-sweet-progress': '^1.1.2',
      'sass-loader': '^8.0.2',
      'url-loader': '^2.3.0',
      uuid: '^3.4.0',
      'webpack-filter-warnings-plugin': '^1.2.1'
    },
    devDependencies: {
      '@testing-library/react': '^9.3.2',
      '@types/jest': '^24.0.23',
      '@types/node': '^13.13.12',
      '@types/react': '^16.9.37',
      '@types/react-dom': '^16.9.8',
      'babel-eslint': '^10.0.3',
      enzyme: '^3.10.0',
      'enzyme-adapter-react-16': '^1.15.1',
      eslint: '^6.6.0',
      'eslint-config-airbnb': '^18.0.1',
      'eslint-config-airbnb-standard': '^3.0.1',
      'eslint-config-node': '^4.1.0',
      'eslint-config-prettier': '^6.5.0',
      'eslint-plugin-import': '^2.21.2',
      'eslint-plugin-jsx-a11y': '^6.2.3',
      'eslint-plugin-node': '^10.0.0',
      'eslint-plugin-prettier': '^3.1.4',
      'eslint-plugin-react': '^7.20.0',
      'eslint-plugin-simple-import-sort': '^4.0.0',
      'eslint-plugin-sort-destructure-keys': '^1.3.3',
      'eslint-plugin-sort-keys-fix': '^1.1.1',
      husky: '^3.0.9',
      jest: '^24.9.0',
      'jest-css-modules': '^2.1.0',
      'jest-fetch-mock': '^2.1.2',
      'jest-puppeteer': '^4.3.0',
      prettier: '^1.19.1',
      puppeteer: '^1.20.0'
    }
  },
  fs: { numberOfFiles: 3416 },
  debug: [
    '2020-07-08T14:20:24.548Z angular/cli config Angular CLI not found.\n',
    '2020-07-08T14:20:24.763Z jest/config Detected Jest.\n',
    '2020-07-08T14:20:24.763Z jest/config Configured Jest.\n',
    '2020-07-08T14:20:24.764Z project Wallaby Node version: v12.15.0\n',
    '2020-07-08T14:20:24.764Z project Wallaby config: C:\\Repos\\doc-centre\\doc-centre-web\\auto.detect\n',
    '2020-07-08T14:20:31.616Z project File cache: C:\\Users\\Ralph.field\\.vscode\\extensions\\wallabyjs.wallaby-vscode-1.0.216\\projects\\f9e02998f33d7b35\n',
    '2020-07-08T14:20:31.661Z uiService Listening port 51235\n',
    '2020-07-08T14:20:31.795Z workers Parallelism for initial run: 6, for regular run: 3\n',
    '2020-07-08T14:20:31.795Z workers Starting run worker instance #0\n',
    '2020-07-08T14:20:31.796Z workers Starting run worker instance #1\n',
    '2020-07-08T14:20:31.796Z workers Starting run worker instance #2\n',
    '2020-07-08T14:20:31.796Z workers Starting run worker instance #3\n',
    '2020-07-08T14:20:31.796Z workers Starting run worker instance #4\n',
    '2020-07-08T14:20:31.796Z workers Starting run worker instance #5\n',
    '2020-07-08T14:20:31.797Z workers Web server is listening at 54916\n',
    '2020-07-08T14:20:31.850Z project File cache requires some updates, waiting required files from IDE\n',
    '2020-07-08T14:20:32.084Z project Stopping process pool\n',
    '2020-07-08T14:20:32.085Z project Test run started; run priority: 3\n',
    '2020-07-08T14:20:32.096Z project Running all tests\n',
    '2020-07-08T14:20:32.162Z workers Starting test run, priority: 3\n',
    '2020-07-08T14:20:32.163Z nodeRunner Starting sandbox [worker #0, session #f3h3d]\n',
    '2020-07-08T14:20:32.163Z nodeRunner Preparing sandbox [worker #0, session #f3h3d]\n',
    '2020-07-08T14:20:32.174Z workers Started run worker instance (delayed) #3\n',
    '2020-07-08T14:20:32.176Z workers Started run worker instance (delayed) #2\n',
    '2020-07-08T14:20:32.218Z workers Started run worker instance (delayed) #0\n',
    '2020-07-08T14:20:32.218Z nodeRunner Prepared sandbox [worker #0, session #f3h3d]\n',
    '2020-07-08T14:20:32.218Z workers [worker #0, session #f3h3d] Running tests in sandbox\n',
    '2020-07-08T14:20:32.248Z workers Started run worker instance (delayed) #1\n',
    '2020-07-08T14:20:32.264Z workers Started run worker instance (delayed) #4\n',
    '2020-07-08T14:20:32.267Z workers Started run worker instance (delayed) #5\n',
    '2020-07-08T14:20:38.747Z workers [f3h3d] Loaded unknown number of test(s)\n',
    '2020-07-08T14:20:38.747Z workers [f3h3d] Test executed: should write a new a dc-hash cookie if no such cookie exists\n',
    '2020-07-08T14:20:38.748Z workers [f3h3d] Test executed: should send the hash in analytics\n',
    '2020-07-08T14:20:38.748Z workers [f3h3d] Test executed: should bypass the service if the request is one of health, countries, _next or assets\n',
    '2020-07-08T14:20:38.748Z workers [f3h3d] Test executed: should get domain from headers\n',
    '2020-07-08T14:20:38.752Z workers [f3h3d] Run 4 test(s), skipped 0 test(s)\n',
    '2020-07-08T14:20:38.753Z workers [f3h3d] Sandbox is responsive, closing it\n',
    '2020-07-08T14:20:38.753Z project Test run finished\n',
    '2020-07-08T14:20:38.754Z project Processed console.log entries\n',
    '2020-07-08T14:20:38.754Z project Processed loading sequences\n',
    '2020-07-08T14:20:38.754Z project Processed executed tests\n',
    '2020-07-08T14:20:38.762Z project Processed code coverage\n',
    '2020-07-08T14:20:38.796Z project Test run result processed and sent to IDE\n'
  ]
}
ArtemGovorov commented 4 years ago

Ok, thanks for the update. I guess some of your node modules was somehow corrupted or not up-to-date.

but now only 4 of our tests are running (should be >200).

Looks like maybe Wallaby is running one spec file exclusively maybe because it contains it.only or some other hints to select the file for an exclusive run. Can you please check your Wallaby.js Tests output channel in VS Code, does it say soemthing like this:

‌0 failing tests, 4 passing (only executed path_to_spec_file)

fieldr92 commented 4 years ago

Alright so... I had just pulled down some code that had a // file.only within (oops!), hence seeing only the 4 tests. However when I removed it, the same errors are appearing as before.

Not all bad news as I think this points to there being a problem file somewhere. Going to go through and comment out some tests to see if I can find a problem file.

Appreciate your help on this! Closing the issue as it seems like a local issue.

Thanks again!

ArtemGovorov commented 4 years ago

Thanks for the update. Please let us know about your findings, we'd like to understand the reason to see if it's possible for us to somehow improve the error reporting in this case to point to the problem file.

fieldr92 commented 4 years ago

Yeah sure, will let you know what we find

fieldr92 commented 4 years ago

Hey Artem, we managed to find and fix the issue in the end.

We weren't handling all of of promise rejections correctly in our tests and for some reason this wasn't picked up with the previous version of Wallaby, whereas it is now. Turned out being a good exercise to improve our unit tests and there were some improvements that came with it.

Thanks again for your help!