{"action":"created","issue":{"url":"https://api.github.com/repos/wallabyjs/public/issues/1686","repository_url":"https://api.github.com/repos/wallabyjs/public","labels_url":"https://api.github.com/repos/wallabyjs/public/issues/1686/labels{/name}","comments_url":"https://api.github.com/repos/wallabyjs/public/issues/1686/comments","events_url":"https://api.github.com/repos/wallabyjs/public/issues/1686/events","html_url":"https://github.com/wallabyjs/public/issues/1686","id":328541681,"node_id":"MDU6SXNzdWUzMjg1NDE2ODE=","number":1686,"title":"Bug: reportConsoleErrorAsError not reporting console.error as failing test","user":{"login":"thehig","id":96122,"node_id":"MDQ6VXNlcjk2MTIy","avatar_url":"https://avatars1.githubusercontent.com/u/96122?v=4","gravatar_id":"","url":"https://api.github.com/users/thehig","html_url":"https://github.com/thehig","followers_url":"https://api.github.com/users/thehig/followers","following_url":"https://api.github.com/users/thehig/following{/other_user}","gists_url":"https://api.github.com/users/thehig/gists{/gist_id}","starred_url":"https://api.github.com/users/thehig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehig/subscriptions","organizations_url":"https://api.github.com/users/thehig/orgs","repos_url":"https://api.github.com/users/thehig/repos","events_url":"https://api.github.com/users/thehig/events{/privacy}","received_events_url":"https://api.github.com/users/thehig/received_events","type":"User","site_admin":false},"labels":[{"id":596831012,"node_id":"MDU6TGFiZWw1OTY4MzEwMTI=","url":"https://api.github.com/repos/wallabyjs/public/labels/solution%20suggested","name":"solution suggested","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-06-01T14:28:11Z","updated_at":"2018-06-03T00:01:44Z","closed_at":"2018-06-02T02:49:26Z","author_association":"NONE","body":"### Issue description or question\r\nI have set `\"reportConsoleErrorAsError\": true` in my wallaby config, however I am not receiving any failed tests despite there being console.errors.\r\n\r\nI am however seeing the errors in the wallaby console in VS-Code (including the 'unknown symbols'):\r\n\r\n```\r\n​​​​​[Info]​​​​​ Started Wallaby.js Core v1.0.595\r\n​​​​​[Info]​​​​​ Wallaby App (realtime reports) is available at: http://localhost:51245\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\admin\\\u001B[22m\u001B[1mduck.spec.js\u001B[22m (\u001B[0m\u001B[1m\u001B[41m12.523s\u001B[49m\u001B[22m\u001B[0m)\r\n​​​​​[Info]​​​​​ console.log: \r\n​​​​​[Info]​​​​​ console.log: \u001B[1mTest Suites: \u001B[22m\u001B[1m\u001B[32m1 passed\u001B[39m\u001B[22m, 1 total\r\n​​​​​[Info]​​​​​ \u001B[1mTests:       \u001B[22m\u001B[1m\u001B[32m24 passed\u001B[39m\u001B[22m, 24 total\r\n​​​​​[Info]​​​​​ \u001B[1mSnapshots:   \u001B[22m0 total\r\n​​​​​[Info]​​​​​ \u001B[1mTime:\u001B[22m        14.331s\r\n​​​​​[Info]​​​​​ \u001B[2mRan all test suites\u001B[22m\u001B[2m.\u001B[22m\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\modelPortfolios\\\u001B[22m\u001B[1mduck.spec.js\u001B[22m (\u001B[0m\u001B[1m\u001B[41m13.148s\u001B[49m\u001B[22m\u001B[0m)\r\n​​​​​[Info]​​​​​ Execution progress: 50 tests\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\shared\\\u001B[22m\u001B[1mhelpers.spec.js\u001B[22m\r\n​​​​​[Info]​​​​​ console.log: \r\n​​​​​[Info]​​​​​ console.log: \u001B[1mTest Suites: \u001B[22m\u001B[1m\u001B[32m2 passed\u001B[39m\u001B[22m, 2 total\r\n​​​​​[Info]​​​​​ \u001B[1mTests:       \u001B[22m\u001B[1m\u001B[32m42 passed\u001B[39m\u001B[22m, 42 total\r\n​​​​​[Info]​​​​​ \u001B[1mSnapshots:   \u001B[22m0 total\r\n​​​​​[Info]​​​​​ \u001B[1mTime:\u001B[22m        15.818s\r\n​​​​​[Info]​​​​​ \u001B[2mRan all test suites\u001B[22m\u001B[2m.\u001B[22m\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\dashboard\\\u001B[22m\u001B[1mduck.spec.js\u001B[22m (\u001B[0m\u001B[1m\u001B[41m14.271s\u001B[49m\u001B[22m\u001B[0m)\r\n​​​​​[Info]​​​​​ console.log: \r\n​​​​​[Info]​​​​​ console.log: \u001B[1mTest Suites: \u001B[22m\u001B[1m\u001B[32m1 passed\u001B[39m\u001B[22m, 1 total\r\n​​​​​[Info]​​​​​ \u001B[1mTests:       \u001B[22m\u001B[1m\u001B[32m27 passed\u001B[39m\u001B[22m, 27 total\r\n​​​​​[Info]​​​​​ \u001B[1mSnapshots:   \u001B[22m\u001B[1m\u001B[32m6 passed\u001B[39m\u001B[22m, 6 total\r\n​​​​​[Info]​​​​​ \u001B[1mTime:\u001B[22m        16.108s\r\n​​​​​[Info]​​​​​ \u001B[2mRan all test suites\u001B[22m\u001B[2m.\u001B[22m\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\savings\\\u001B[22m\u001B[1mduck.spec.js\u001B[22m (\u001B[0m\u001B[1m\u001B[41m14.578s\u001B[49m\u001B[22m\u001B[0m)\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\whitelabel\\components\\\u001B[22m\u001B[1mWhiteLabelApp.spec.js\u001B[22m\r\n​​​​​[Info]​​​​​ console.log:   \u001B[1m● \u001B[22mConsole\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `store.subscribe` is marked as required in `Provider`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in Provider (at WhiteLabelApp.js:57)\u001B[39m\r\n​​​​​[Info]​​​​​ console.log: \r\n​​​​​[Info]​​​​​ console.log: \u001B[1mTest Suites: \u001B[22m\u001B[1m\u001B[32m2 passed\u001B[39m\u001B[22m, 2 total\r\n​​​​​[Info]​​​​​ \u001B[1mTests:       \u001B[22m\u001B[1m\u001B[32m6 passed\u001B[39m\u001B[22m, 6 total\r\n​​​​​[Info]​​​​​ \u001B[1mSnapshots:   \u001B[22m0 total\r\n​​​​​[Info]​​​​​ \u001B[1mTime:\u001B[22m        20.473s\r\n​​​​​[Info]​​​​​ \u001B[2mRan all test suites\u001B[22m\u001B[2m.\u001B[22m\r\n​​​​​[Info]​​​​​ Execution progress: 100 tests\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\savings\\ecosystems\\\u001B[22m\u001B[1mSavings-New.spec.js\u001B[22m (\u001B[0m\u001B[1m\u001B[41m14.706s\u001B[49m\u001B[22m\u001B[0m)\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\whitelabel\\components\\\u001B[22m\u001B[1mWhiteLabelDevProvider.spec.js\u001B[22m\r\n​​​​​[Info]​​​​​ console.log:   \u001B[1m● \u001B[22mConsole\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `configureStore` is marked as required in `WhiteLabelApp`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in WhiteLabelApp (at WhiteLabelDevProvider.spec.js:35)\u001B[39m\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `history` is marked as required in `WhiteLabelApp`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in WhiteLabelApp (at WhiteLabelDevProvider.spec.js:35)\u001B[39m\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `config.messages` is marked as required in `WhiteLabelApp`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in WhiteLabelApp (at WhiteLabelDevProvider.js:49)\u001B[39m\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\whitelabel\\components\\\u001B[22m\u001B[1mWhiteLabelProvider.spec.js\u001B[22m\r\n​​​​​[Info]​​​​​ console.log:   \u001B[1m● \u001B[22mConsole\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `configureStore` is marked as required in `WhiteLabelApp`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in WhiteLabelApp (at WhiteLabelProvider.spec.js:29)\u001B[39m\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `history` is marked as required in `WhiteLabelApp`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in WhiteLabelApp (at WhiteLabelProvider.spec.js:29)\u001B[39m\r\n​​​​​[Info]​​​​​     \u001B[2m\u001B[31mconsole.error\u001B[39m\u001B[22m \u001B[2mnode_modules\\fbjs\\lib\\warning.js:33\u001B[22m\r\n​​​​​[Info]​​​​​ \u001B[31m      Warning: Failed prop type: The prop `config.messages` is marked as required in `WhiteLabelApp`, but its value is `undefined`.\r\n​​​​​[Info]​​​​​           in WhiteLabelApp (at WhiteLabelProvider.js:30)\u001B[39m\r\n​​​​​[Info]​​​​​ console.log: \u001B[0m\u001B[7m\u001B[1m\u001B[32m PASS \u001B[39m\u001B[22m\u001B[27m\u001B[0m \u001B[2mc:\\Users\\makes\\.vscode-insiders\\extensions\\wallabyjs.wallaby-vscode-1.0.86\\projects\\8603a3d84fb83a7c\\instrumented\\src\\packages\\whitelabel\\\u001B[22m\u001B[1mconfigLoader.spec.js\u001B[22m\r\n​​​​​[Info]​​​​​ console.log: \r\n​​​​​[Info]​​​​​ console.log: \u001B[1mTest Suites: \u001B[22m\u001B[1m\u001B[32m4 passed\u001B[39m\u001B[22m, 4 total\r\n​​​​​[Info]​​​​​ \u001B[1mTests:       \u001B[22m\u001B[1m\u001B[33m3 skipped\u001B[39m\u001B[22m, \u001B[1m\u001B[32m23 passed\u001B[39m\u001B[22m, 26 total\r\n​​​​​[Info]​​​​​ \u001B[1mSnapshots:   \u001B[22m0 total\r\n​​​​​[Info]​​​​​ \u001B[1mTime:\u001B[22m        21.386s\r\n​​​​​[Info]​​​​​ \u001B[2mRan all test suites\u001B[22m\u001B[2m.\u001B[22m\r\n```\r\n\r\nRelated issue: https://github.com/wallabyjs/public/issues/321\r\n\r\n### Wallaby.js configuration file\r\n\r\n```javascript\r\n/*\r\nSources\r\nhttps://github.com/wallabyjs/public/issues/1472\r\nhttps://github.com/thehig/storyshots-css-wallaby\r\n*/\r\n\r\n/* eslint-disable no-undef */\r\n\r\nmodule.exports = function(wallaby) {\r\n  // Babel, jest-cli and some other modules are located under\r\n  // react-scripts/node_modules, so need to let node.js know about it\r\n  var path = require('path');\r\n  process.env.NODE_PATH +=\r\n    path.delimiter +\r\n    path.join(__dirname, 'node_modules') +\r\n    path.delimiter +\r\n    path.join(__dirname, 'node_modules/react-scripts/node_modules');\r\n  require('module').Module._initPaths();\r\n\r\n  // Babel needs this\r\n  process.env.NODE_ENV = 'development';\r\n\r\n  var babelCompiler = wallaby.compilers.babel({\r\n    babel: require('babel-core'),\r\n    presets: ['react-app']\r\n  });\r\n\r\n  return {\r\n    files: [\r\n      // Include all files required to run the app\r\n      // Wallaby will copy these files internally to add instrumentation\r\n      // Everything required to run Storybook is required to be able to run storyshots\r\n      '.storybook/**/*.js',\r\n      'src/**/*.+(js|jsx|json|snap|css|less|sass|scss|jpg|jpeg|gif|png|svg)',\r\n      // But don't include the tests that will be triggering\r\n      '!src/**/*.spec.js'\r\n    ],\r\n    tests: [\r\n      // '!src/atomic/storyshots.spec.js', // Can be useful to disable the storyshots tests as they are long running\r\n      'src/**/*.spec.js'\r\n    ],\r\n    env: { type: 'node', runner: 'node' },\r\n    compilers: {\r\n      '**/*.js': babelCompiler,\r\n      // 'dot' folders are not included by the above\r\n      '.storybook/**/*.js': babelCompiler\r\n    },\r\n    filesWithNoCoverageCalculated: [\r\n      'node_modules/**/*.*',\r\n      '.storybook/**/*.js',\r\n      'src/**/*.stories*.js',\r\n\r\n      'src/**/*.spec*.js',\r\n      'src/spec/**/*.*',\r\n\r\n      'src/registerServiceWorker.js',\r\n      'src/config.js',\r\n\r\n      'src/utils/**/*.*'\r\n    ],\r\n    hints: {\r\n      // https://wallabyjs.com/docs/config/coverage.html#stopping-code-coverage-calculation-for-code-blocks-inside-a-file\r\n      ignoreCoverage: /ignore coverage/ // or /istanbul ignore next/, or any RegExp\r\n    },\r\n    setup: wallaby => {\r\n      const jestConfig = require('react-scripts/scripts/utils/createJestConfig')(\r\n        p => require.resolve('react-scripts/' + p)\r\n      );\r\n      Object.keys(jestConfig.transform || {}).forEach(\r\n        k => ~k.indexOf('^.+\\\\.(js|jsx') && void delete jestConfig.transform[k]\r\n      );\r\n      delete jestConfig.testEnvironment;\r\n      wallaby.testFramework.configure(jestConfig);\r\n    },\r\n    testFramework: 'jest',\r\n    reportConsoleErrorAsError: true\r\n  };\r\n};\r\n```\r\n\r\n### Code editor or IDE name and version\r\n\r\nVisual Studio Code v1.24.0-insiders\r\n\r\n### OS name and version\r\n\r\nWindows 10\r\n"},"comment":{"url":"https://api.github.com/repos/wallabyjs/public/issues/comments/394125226","html_url":"https://github.com/wallabyjs/public/issues/1686#issuecomment-394125226","issue_url":"https://api.github.com/repos/wallabyjs/public/issues/1686","id":394125226,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDEyNTIyNg==","user":{"login":"thehig","id":96122,"node_id":"MDQ6VXNlcjk2MTIy","avatar_url":"https://avatars1.githubusercontent.com/u/96122?v=4","gravatar_id":"","url":"https://api.github.com/users/thehig","html_url":"https://github.com/thehig","followers_url":"https://api.github.com/users/thehig/followers","following_url":"https://api.github.com/users/thehig/following{/other_user}","gists_url":"https://api.github.com/users/thehig/gists{/gist_id}","starred_url":"https://api.github.com/users/thehig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehig/subscriptions","organizations_url":"https://api.github.com/users/thehig/orgs","repos_url":"https://api.github.com/users/thehig/repos","events_url":"https://api.github.com/users/thehig/events{/privacy}","received_events_url":"https://api.github.com/users/thehig/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T00:01:44Z","updated_at":"2018-06-03T00:01:44Z","author_association":"NONE","body":"Working on it already 😄 "}}
{"actor":{"display_login":"thehig"}}