{"action":"created","issue":{"url":"https://api.github.com/repos/avajs/ava/issues/1067","repository_url":"https://api.github.com/repos/avajs/ava","labels_url":"https://api.github.com/repos/avajs/ava/issues/1067/labels{/name}","comments_url":"https://api.github.com/repos/avajs/ava/issues/1067/comments","events_url":"https://api.github.com/repos/avajs/ava/issues/1067/events","html_url":"https://github.com/avajs/ava/issues/1067","id":181486691,"number":1067,"title":"Inheritance of required file","user":{"login":"yamsellem","id":606754,"avatar_url":"https://avatars.githubusercontent.com/u/606754?v=3","gravatar_id":"","url":"https://api.github.com/users/yamsellem","html_url":"https://github.com/yamsellem","followers_url":"https://api.github.com/users/yamsellem/followers","following_url":"https://api.github.com/users/yamsellem/following{/other_user}","gists_url":"https://api.github.com/users/yamsellem/gists{/gist_id}","starred_url":"https://api.github.com/users/yamsellem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamsellem/subscriptions","organizations_url":"https://api.github.com/users/yamsellem/orgs","repos_url":"https://api.github.com/users/yamsellem/repos","events_url":"https://api.github.com/users/yamsellem/events{/privacy}","received_events_url":"https://api.github.com/users/yamsellem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-06T18:10:49Z","updated_at":"2016-10-07T06:33:00Z","closed_at":null,"body":"Their is something weird / broker about external module inheritance.\r\n\r\nIn the following code, declare `TeaPot` class in the test and everything just works.\r\nBut uncomment the `const TeaPot` that required it from a path (after removing the TeaPot class definition) and it won't work anymore.\r\n\r\n```javascript\r\nconst test = require('ava');\r\n\r\n// replacing this\r\nclass TeaPot {\r\n    get value() { return 12; }\r\n}\r\n// by that, broke the test\r\n// const TeaPot = require('./teapot');\r\n\r\nclass Pot extends TeaPot {}\r\n\r\ntest('hot tea', t => {\r\n    const pot = new Pot();\r\n    t.is(pot.value, 12);\r\n});\r\n```\r\n\r\nThe error is `failed with \"Class constructor TeaPot cannot be invoked without 'new'\"`.\r\nAva 0.16.0."},"comment":{"url":"https://api.github.com/repos/avajs/ava/issues/comments/252163924","html_url":"https://github.com/avajs/ava/issues/1067#issuecomment-252163924","issue_url":"https://api.github.com/repos/avajs/ava/issues/1067","id":252163924,"user":{"login":"yamsellem","id":606754,"avatar_url":"https://avatars.githubusercontent.com/u/606754?v=3","gravatar_id":"","url":"https://api.github.com/users/yamsellem","html_url":"https://github.com/yamsellem","followers_url":"https://api.github.com/users/yamsellem/followers","following_url":"https://api.github.com/users/yamsellem/following{/other_user}","gists_url":"https://api.github.com/users/yamsellem/gists{/gist_id}","starred_url":"https://api.github.com/users/yamsellem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamsellem/subscriptions","organizations_url":"https://api.github.com/users/yamsellem/orgs","repos_url":"https://api.github.com/users/yamsellem/repos","events_url":"https://api.github.com/users/yamsellem/events{/privacy}","received_events_url":"https://api.github.com/users/yamsellem/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T06:33:00Z","updated_at":"2016-10-07T06:33:00Z","body":"Sorry about not been cristal clear. \r\nIt's just the same class. \r\n\r\n```javascript\r\nmodule.exports = \r\nclass TeaPot {\r\n    get value() { return 12; }\r\n}\r\n```"}}
{"actor":{"display_login":"yamsellem"}}