{"action":"created","issue":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/1631","repository_url":"https://api.github.com/repos/tmpvar/jsdom","labels_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1631/labels{/name}","comments_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1631/comments","events_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1631/events","html_url":"https://github.com/tmpvar/jsdom/issues/1631","id":183694650,"number":1631,"title":"Date is not a constructor","user":{"login":"FezVrasta","id":5382443,"avatar_url":"https://avatars.githubusercontent.com/u/5382443?v=3","gravatar_id":"","url":"https://api.github.com/users/FezVrasta","html_url":"https://github.com/FezVrasta","followers_url":"https://api.github.com/users/FezVrasta/followers","following_url":"https://api.github.com/users/FezVrasta/following{/other_user}","gists_url":"https://api.github.com/users/FezVrasta/gists{/gist_id}","starred_url":"https://api.github.com/users/FezVrasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FezVrasta/subscriptions","organizations_url":"https://api.github.com/users/FezVrasta/orgs","repos_url":"https://api.github.com/users/FezVrasta/repos","events_url":"https://api.github.com/users/FezVrasta/events{/privacy}","received_events_url":"https://api.github.com/users/FezVrasta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-18T13:59:47Z","updated_at":"2016-10-18T14:08:58Z","closed_at":null,"body":"I'm using jsdom with Jest + Enzyme + React.\r\n\r\nWhen I mount a component with Enzyme `mount` after I properly defined `global.window` and `global.document`, I get an error:\r\n\r\n```\r\nTypeError: Date is not a constructor\r\n\r\n      at DocumentImpl (node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:269:83)\r\n      at Object.setup (node_modules/jsdom/lib/jsdom/living/generated/Document.js:702:17)\r\n      at Object.create (node_modules/jsdom/lib/jsdom/living/generated/Document.js:672:10)\r\n      at new Window (node_modules/jsdom/lib/jsdom/browser/Window.js:67:29)\r\n      at Object.<anonymous>.exports.jsdom (node_modules/jsdom/lib/jsdom.js:109:18)\r\n```\r\n\r\nI narrowed down the problem to this line of code:\r\nhttps://github.com/tmpvar/jsdom/blob/master/lib/jsdom/living/nodes/Document-impl.js#L269\r\n\r\nSeems like `Date` is `undefiend`... How is it possible?"},"comment":{"url":"https://api.github.com/repos/tmpvar/jsdom/issues/comments/254518789","html_url":"https://github.com/tmpvar/jsdom/issues/1631#issuecomment-254518789","issue_url":"https://api.github.com/repos/tmpvar/jsdom/issues/1631","id":254518789,"user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T14:08:58Z","updated_at":"2016-10-18T14:08:58Z","body":"Can you share a minimal example that triggers this problem, without using external libraries like Jest or Enzyme or React?"}}
{"actor":{"display_login":"domenic"}}