{"action":"created","issue":{"url":"https://api.github.com/repos/stryker-mutator/stryker/issues/656","repository_url":"https://api.github.com/repos/stryker-mutator/stryker","labels_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/656/labels{/name}","comments_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/656/comments","events_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/656/events","html_url":"https://github.com/stryker-mutator/stryker/issues/656","id":307060076,"number":656,"title":"Don't mutate `declare` types","user":{"login":"JoshuaKGoldberg","id":3335181,"avatar_url":"https://avatars1.githubusercontent.com/u/3335181?v=4","gravatar_id":"","url":"https://api.github.com/users/JoshuaKGoldberg","html_url":"https://github.com/JoshuaKGoldberg","followers_url":"https://api.github.com/users/JoshuaKGoldberg/followers","following_url":"https://api.github.com/users/JoshuaKGoldberg/following{/other_user}","gists_url":"https://api.github.com/users/JoshuaKGoldberg/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshuaKGoldberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshuaKGoldberg/subscriptions","organizations_url":"https://api.github.com/users/JoshuaKGoldberg/orgs","repos_url":"https://api.github.com/users/JoshuaKGoldberg/repos","events_url":"https://api.github.com/users/JoshuaKGoldberg/events{/privacy}","received_events_url":"https://api.github.com/users/JoshuaKGoldberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T22:21:39Z","updated_at":"2018-03-21T10:57:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Summary\r\n\r\nIf you have a `.d.ts` file that includes a `declare module \"foo\" { }`, the module name (`\"foo\"`) will be mutated during tests.\r\n\r\n```diff\r\nMutant survived!\r\nC:\\Code\\Project\\src\\typings\\b2a.d.ts:3:15\r\nMutator: StringLiteral\r\n-   declare module \"b2a\" {\r\n+   declare module \"\" {\r\n```\r\n\r\n### Stryker config\r\n\r\n```js\r\nmodule.exports = function(config) {\r\n  config.set({\r\n    coverageAnalysis: \"off\",\r\n    files: [\r\n      \"tsconfig.test.json\",\r\n      {\r\n        included: false,\r\n        pattern: \"test/unit/jest.config.js\",\r\n        transpiled: false,\r\n      },\r\n      \"src/**/*.ts\",\r\n      \"src/**/*.tsx\",\r\n    ],\r\n    jest: {\r\n      config: require(\"./test/unit/jest.config.js\"),\r\n    },\r\n    mutate: [\r\n      \"src/**/*.ts\",\r\n      \"!src/**/*.test.ts\",\r\n    ],\r\n    mutator: \"typescript\",\r\n    reporter: [\"clear-text\", \"progress\"],\r\n    testRunner: \"jest\",\r\n    transpilers: [\"typescript\"],\r\n    tsconfigFile: \"tsconfig.json\",\r\n  });\r\n};\r\n```\r\n\r\n### Stryker environment\r\n\r\n<!-- Please list your stryker plugins + versions here (output of `npm ls | grep stryker`) -->\r\n\r\n```\r\n+-- stryker@0.19.3\r\n+-- stryker-api@0.13.0\r\n```\r\n\r\n### Your Environment\r\n| software         | version(s)\r\n| ---------------- | -------  \r\n| node             |  9.8.0\r\n| npm              |  5.6.0\r\n| Operating System |  Windows 10"},"comment":{"url":"https://api.github.com/repos/stryker-mutator/stryker/issues/comments/374899815","html_url":"https://github.com/stryker-mutator/stryker/issues/656#issuecomment-374899815","issue_url":"https://api.github.com/repos/stryker-mutator/stryker/issues/656","id":374899815,"user":{"login":"nicojs","id":1828233,"avatar_url":"https://avatars3.githubusercontent.com/u/1828233?v=4","gravatar_id":"","url":"https://api.github.com/users/nicojs","html_url":"https://github.com/nicojs","followers_url":"https://api.github.com/users/nicojs/followers","following_url":"https://api.github.com/users/nicojs/following{/other_user}","gists_url":"https://api.github.com/users/nicojs/gists{/gist_id}","starred_url":"https://api.github.com/users/nicojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicojs/subscriptions","organizations_url":"https://api.github.com/users/nicojs/orgs","repos_url":"https://api.github.com/users/nicojs/repos","events_url":"https://api.github.com/users/nicojs/events{/privacy}","received_events_url":"https://api.github.com/users/nicojs/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T10:57:53Z","updated_at":"2018-03-21T10:57:53Z","author_association":"OWNER","body":"@JoshuaKGoldberg thanks for reporting this issue.\r\n\r\nJust to be sure: you do want to mutate `.d.ts` files? If not, you can just ignore that by adding `\"!src/**/*.d.ts\"` in your `mutate` array."}}
{"actor":{"display_login":"nicojs"}}