{"action":"created","issue":{"url":"https://api.github.com/repos/wallabyjs/public/issues/1626","repository_url":"https://api.github.com/repos/wallabyjs/public","labels_url":"https://api.github.com/repos/wallabyjs/public/issues/1626/labels{/name}","comments_url":"https://api.github.com/repos/wallabyjs/public/issues/1626/comments","events_url":"https://api.github.com/repos/wallabyjs/public/issues/1626/events","html_url":"https://github.com/wallabyjs/public/issues/1626","id":316532552,"number":1626,"title":"Test fails due to upstream pretty-format package","user":{"login":"TrevorBurnham","id":224895,"avatar_url":"https://avatars1.githubusercontent.com/u/224895?v=4","gravatar_id":"","url":"https://api.github.com/users/TrevorBurnham","html_url":"https://github.com/TrevorBurnham","followers_url":"https://api.github.com/users/TrevorBurnham/followers","following_url":"https://api.github.com/users/TrevorBurnham/following{/other_user}","gists_url":"https://api.github.com/users/TrevorBurnham/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorBurnham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorBurnham/subscriptions","organizations_url":"https://api.github.com/users/TrevorBurnham/orgs","repos_url":"https://api.github.com/users/TrevorBurnham/repos","events_url":"https://api.github.com/users/TrevorBurnham/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorBurnham/received_events","type":"User","site_admin":false},"labels":[{"id":150744620,"url":"https://api.github.com/repos/wallabyjs/public/labels/bug","name":"bug","color":"fc2929","default":true},{"id":596831012,"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":0,"created_at":"2018-04-21T22:59:51Z","updated_at":"2018-04-22T04:26:51Z","closed_at":"2018-04-22T04:25:27Z","author_association":"NONE","body":"### Issue description or question\r\n\r\nThis one was a puzzler for me. I hit the same error mentioned in [this comment](https://github.com/wallabyjs/public/issues/1554#issuecomment-373518205) by @nathanvale:\r\n\r\n```\r\nTypeError: Cannot read property 'test' of undefined\r\n  \r\n  at findPlugin (../../node_modules/pretty-format/build/index.js:272:20)\r\n      at Array.map (<anonymous>)\r\n  at Object.<anonymous> (../../../../.vscode/extensions/WallabyJs.wallaby-vscode-1.0.83/projects/cc362621f18cef70/instrumented/src/Form/__tests__/Form.js:25:35)\r\n  at Object.e.length.arguments.(anonymous function) (../../../../.vscode/extensions/WallabyJs.wallaby-vscode-1.0.83/projects/cc362621f18cef70/instrumented/config/jest/setupTests.js:28:1786)\r\n\r\n```\r\n\r\nI tried to replicate in a new project but couldn't. Then I tried simply copying and pasting the project to a new directory—and still couldn't! Then I found that if I deleted `node_modules/` in a parent directory, the error went away and all tests passed. I isolated the source of the problem to one particular dependency, `lint-staged@6.1.1`, which in turn brings in `pretty-format@21.2.1`.\r\n\r\nI've created a complete [test repo](https://github.com/TrevorBurnham/wallaby-bug-report). Steps to reproduce the bug in that repo:\r\n\r\n1. `yarn install`\r\n1. `cd subproject && yarn install`\r\n1. Open in VS Code and run Wallaby\r\n\r\nNote that the bug occurs whether you have the whole repo or just the `subproject/` dir open in your editor.\r\n\r\n### Wallaby.js configuration file\r\n\r\n```javascript\r\nmodule.exports = function(wallaby) {\r\n  return {\r\n    testFramework: 'jest',\r\n\r\n    env: {\r\n      type: 'node',\r\n      runner: 'node',\r\n    },\r\n\r\n    files: [\r\n      'subproject/src/**/*.js',\r\n      'subproject/src/**/*.snap',\r\n      'subproject/jest.config.js',\r\n      'subproject/config/jest/setupTests.js',\r\n      '!subproject/src/**/__tests__/*.js',\r\n    ],\r\n\r\n    tests: ['subproject/src/**/__tests__/*.js'],\r\n\r\n    compilers: {\r\n      '**/*.js': wallaby.compilers.babel(),\r\n    },\r\n\r\n    setup(wallaby) {\r\n      const jestConfig = require(`./subproject/jest.config.js`);\r\n      wallaby.testFramework.configure(jestConfig);\r\n    },\r\n  };\r\n};\r\n```\r\n\r\n### Code editor or IDE name and version\r\n\r\nVisual Studio Code v1.22.2\r\n\r\n### OS name and version\r\n\r\nmacOS 10.13.4\r\n"},"comment":{"url":"https://api.github.com/repos/wallabyjs/public/issues/comments/383354500","html_url":"https://github.com/wallabyjs/public/issues/1626#issuecomment-383354500","issue_url":"https://api.github.com/repos/wallabyjs/public/issues/1626","id":383354500,"user":{"login":"ArtemGovorov","id":979966,"avatar_url":"https://avatars1.githubusercontent.com/u/979966?v=4","gravatar_id":"","url":"https://api.github.com/users/ArtemGovorov","html_url":"https://github.com/ArtemGovorov","followers_url":"https://api.github.com/users/ArtemGovorov/followers","following_url":"https://api.github.com/users/ArtemGovorov/following{/other_user}","gists_url":"https://api.github.com/users/ArtemGovorov/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtemGovorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtemGovorov/subscriptions","organizations_url":"https://api.github.com/users/ArtemGovorov/orgs","repos_url":"https://api.github.com/users/ArtemGovorov/repos","events_url":"https://api.github.com/users/ArtemGovorov/events{/privacy}","received_events_url":"https://api.github.com/users/ArtemGovorov/received_events","type":"User","site_admin":false},"created_at":"2018-04-22T04:26:51Z","updated_at":"2018-04-22T04:26:51Z","author_association":"OWNER","body":"Thanks for sharing the sample repo. The issue is fixed and the fix is published in [the latest core](https://wallabyjs.com/docs/intro/troubleshooting.html#forcing-wallabyjs-core-update) version."}}
{"actor":{"display_login":"ArtemGovorov"}}