{"action":"created","issue":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/884","repository_url":"https://api.github.com/repos/kulshekhar/ts-jest","labels_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/884/labels{/name}","comments_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/884/comments","events_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/884/events","html_url":"https://github.com/kulshekhar/ts-jest/issues/884","id":383236942,"node_id":"MDU6SXNzdWUzODMyMzY5NDI=","number":884,"title":"TypeError: Cannot read property 'configure' of undefined","user":{"login":"moonray","id":281245,"node_id":"MDQ6VXNlcjI4MTI0NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/281245?v=4","gravatar_id":"","url":"https://api.github.com/users/moonray","html_url":"https://github.com/moonray","followers_url":"https://api.github.com/users/moonray/followers","following_url":"https://api.github.com/users/moonray/following{/other_user}","gists_url":"https://api.github.com/users/moonray/gists{/gist_id}","starred_url":"https://api.github.com/users/moonray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moonray/subscriptions","organizations_url":"https://api.github.com/users/moonray/orgs","repos_url":"https://api.github.com/users/moonray/repos","events_url":"https://api.github.com/users/moonray/events{/privacy}","received_events_url":"https://api.github.com/users/moonray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-21T18:03:28Z","updated_at":"2018-11-21T21:31:46Z","closed_at":null,"author_association":"NONE","body":"## Issue <!-- describe the issue below -->:\r\nAfter updating from ts-jest@22.0.4 many tests fail with `TypeError: Cannot read property 'configure' of undefined`\r\nit seems to be happening at `Enzyme.configure({ adapter: new enzymeAdapterReact16() });`\r\n\r\n```typescript\r\nimport Enzyme, { shallow } from 'enzyme';\r\nimport enzymeAdapterReact16 from 'enzyme-adapter-react-16';\r\nimport React from 'react';\r\n\r\nimport TaskMenuCall, { TaskMenuCallProps } from './TaskMenuCall';\r\n\r\nEnzyme.configure({ adapter: new enzymeAdapterReact16() });\r\n\r\nconst getDefaultProps = (): TaskMenuCallProps & { onClick: jest.Mock } => ({\r\n  onClick: jest.fn(),\r\n  phones: [{ label: 'mobile', phone: '3521231234' }, { label: 'office', phone: '3525675678' }],\r\n});\r\n\r\ndescribe('TaskMenuCall component', () => {\r\n  it('shallow renders without crashing', () => {\r\n    const props = getDefaultProps();\r\n    shallow(<TaskMenuCall {...props} />);\r\n  });\r\n});\r\n```\r\n\r\n## Expected behavior <!-- describe the expected behavior below -->:\r\nTest keep running successfully\r\n\r\n## Debug log:\r\n<details/>\r\n<summary>log file content<!-- You can activate the debug logger by setting the environment variable TS_JEST_LOG=\"ts-jest.log\" before running tests. The output of the logger will be in **ts-jest.log** in CWD, paste it in the below section: --></summary>\r\n\r\n```bash\r\n# content of ts-jest.log :\r\n\r\n```\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/comments/440815548","html_url":"https://github.com/kulshekhar/ts-jest/issues/884#issuecomment-440815548","issue_url":"https://api.github.com/repos/kulshekhar/ts-jest/issues/884","id":440815548,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDgxNTU0OA==","user":{"login":"RSPereira","id":1660789,"node_id":"MDQ6VXNlcjE2NjA3ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/1660789?v=4","gravatar_id":"","url":"https://api.github.com/users/RSPereira","html_url":"https://github.com/RSPereira","followers_url":"https://api.github.com/users/RSPereira/followers","following_url":"https://api.github.com/users/RSPereira/following{/other_user}","gists_url":"https://api.github.com/users/RSPereira/gists{/gist_id}","starred_url":"https://api.github.com/users/RSPereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RSPereira/subscriptions","organizations_url":"https://api.github.com/users/RSPereira/orgs","repos_url":"https://api.github.com/users/RSPereira/repos","events_url":"https://api.github.com/users/RSPereira/events{/privacy}","received_events_url":"https://api.github.com/users/RSPereira/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T21:31:46Z","updated_at":"2018-11-21T21:31:46Z","author_association":"NONE","body":"I have a simular problem. After update ts-jest@22.0.0 to @23.10.4 many tests fail with `TypeError: Cannot read property 'register' of undefined`\r\n\r\n```\r\nimport Validator from 'validatorjs'\r\n\r\n...\r\n\r\nValidator.register(\r\n  'only_numbers',\r\n  CustomValidations.CustomOnlyNumbers.validate,\r\n  CustomValidations.CustomOnlyNumbers.errorMessage\r\n)\r\n\r\n...\r\n```\r\n\r\nIt was working before update."}}
{"actor":{"display_login":"RSPereira"}}