{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-amplify/issues/1077","repository_url":"https://api.github.com/repos/aws/aws-amplify","labels_url":"https://api.github.com/repos/aws/aws-amplify/issues/1077/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-amplify/issues/1077/comments","events_url":"https://api.github.com/repos/aws/aws-amplify/issues/1077/events","html_url":"https://github.com/aws/aws-amplify/issues/1077","id":334422593,"node_id":"MDU6SXNzdWUzMzQ0MjI1OTM=","number":1077,"title":"Jest failed in react native project when import aws-amplify","user":{"login":"fangleen","id":1893298,"node_id":"MDQ6VXNlcjE4OTMyOTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1893298?v=4","gravatar_id":"","url":"https://api.github.com/users/fangleen","html_url":"https://github.com/fangleen","followers_url":"https://api.github.com/users/fangleen/followers","following_url":"https://api.github.com/users/fangleen/following{/other_user}","gists_url":"https://api.github.com/users/fangleen/gists{/gist_id}","starred_url":"https://api.github.com/users/fangleen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fangleen/subscriptions","organizations_url":"https://api.github.com/users/fangleen/orgs","repos_url":"https://api.github.com/users/fangleen/repos","events_url":"https://api.github.com/users/fangleen/events{/privacy}","received_events_url":"https://api.github.com/users/fangleen/received_events","type":"User","site_admin":false},"labels":[{"id":772762686,"node_id":"MDU6TGFiZWw3NzI3NjI2ODY=","url":"https://api.github.com/repos/aws/aws-amplify/labels/investigating","name":"investigating","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":{"login":"nidsharm","id":28815212,"node_id":"MDQ6VXNlcjI4ODE1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/28815212?v=4","gravatar_id":"","url":"https://api.github.com/users/nidsharm","html_url":"https://github.com/nidsharm","followers_url":"https://api.github.com/users/nidsharm/followers","following_url":"https://api.github.com/users/nidsharm/following{/other_user}","gists_url":"https://api.github.com/users/nidsharm/gists{/gist_id}","starred_url":"https://api.github.com/users/nidsharm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidsharm/subscriptions","organizations_url":"https://api.github.com/users/nidsharm/orgs","repos_url":"https://api.github.com/users/nidsharm/repos","events_url":"https://api.github.com/users/nidsharm/events{/privacy}","received_events_url":"https://api.github.com/users/nidsharm/received_events","type":"User","site_admin":false},"assignees":[{"login":"nidsharm","id":28815212,"node_id":"MDQ6VXNlcjI4ODE1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/28815212?v=4","gravatar_id":"","url":"https://api.github.com/users/nidsharm","html_url":"https://github.com/nidsharm","followers_url":"https://api.github.com/users/nidsharm/followers","following_url":"https://api.github.com/users/nidsharm/following{/other_user}","gists_url":"https://api.github.com/users/nidsharm/gists{/gist_id}","starred_url":"https://api.github.com/users/nidsharm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidsharm/subscriptions","organizations_url":"https://api.github.com/users/nidsharm/orgs","repos_url":"https://api.github.com/users/nidsharm/repos","events_url":"https://api.github.com/users/nidsharm/events{/privacy}","received_events_url":"https://api.github.com/users/nidsharm/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-06-21T10:00:05Z","updated_at":"2018-06-26T17:24:10Z","closed_at":"2018-06-26T17:24:10Z","author_association":"NONE","body":"Do you want to request a feature or report a bug?\r\n**report**\r\nWhat is the current behavior?\r\nJest fail with the simple test in Expo project.\r\n\r\nAll I did was add in Amplify, now my Jest tests fail on testing components in React-Native (using Expo) I get the fail for: \"TypeError: window.addEventListerner is not a function at Object. (node_modules/aws-amplify/lib/common/ClientDevice/browser.js\" (and one for index.js in same directory, and just \"common/broswer.js\"\r\n\r\nThe test is the default Expo test that is in the project when you create it (passes if I just remove all of Amplify:\r\n\r\n```\r\nimport React from 'react';\r\nimport { View } from 'react-native';\r\nimport Amplify from 'aws-amplify'; // If I remove this line, jest will pass the test\r\n\r\nimport renderer from 'react-test-renderer';\r\n\r\nit('renders without crashing', () => {\r\n  const rendered = renderer.create(<View />).toJSON();\r\n  expect(rendered).toBeTruthy();\r\n});\r\n\r\n```\r\n\r\nIf the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than AWS Amplify.\r\nRun the above test in a project created by create-react-native-app and add amplify support.\r\n\r\nWhat is the expected behavior?\r\nThe test should pass when import the  aws-amplify library\r\n\r\nWhich versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?\r\n\"aws-amplify\": \"^0.4.4\",\r\n\"aws-amplify-react-native\": \"^0.2.15\",\r\n\r\nYou can turn on the debug mode to provide more info for us by setting ```window.LOG_LEVEL = 'DEBUG';``` in your app.\r\n"}}
{"actor":{"display_login":"powerful23"}}