{"action":"created","issue":{"url":"https://api.github.com/repos/avajs/ava/issues/631","repository_url":"https://api.github.com/repos/avajs/ava","labels_url":"https://api.github.com/repos/avajs/ava/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/avajs/ava/issues/631/comments","events_url":"https://api.github.com/repos/avajs/ava/issues/631/events","html_url":"https://github.com/avajs/ava/issues/631","id":140041952,"number":631,"title":"Allow tests files to have any extension (i.e. `.jsx`, `.ts`)","user":{"login":"dustinsanders","id":15836012,"avatar_url":"https://avatars.githubusercontent.com/u/15836012?v=3","gravatar_id":"","url":"https://api.github.com/users/dustinsanders","html_url":"https://github.com/dustinsanders","followers_url":"https://api.github.com/users/dustinsanders/followers","following_url":"https://api.github.com/users/dustinsanders/following{/other_user}","gists_url":"https://api.github.com/users/dustinsanders/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinsanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinsanders/subscriptions","organizations_url":"https://api.github.com/users/dustinsanders/orgs","repos_url":"https://api.github.com/users/dustinsanders/repos","events_url":"https://api.github.com/users/dustinsanders/events{/privacy}","received_events_url":"https://api.github.com/users/dustinsanders/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/avajs/ava/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":39,"created_at":"2016-03-10T23:44:23Z","updated_at":"2016-07-04T05:00:45Z","closed_at":null,"body":"With the latest release(0.13) and the ability to support jsx; I would like the ability to write my test that contains jsx with a jsx extension. However ava is [filtering](https://github.com/sindresorhus/ava/blob/master/api.js#L320) only for files with .js extensions. I'm a little confused as to why ava allows for a glob pattern in the cli but then only filters down to .js files.\r\n\r\nI can make a PR if this is something worthwhile to the maintainers."},"comment":{"url":"https://api.github.com/repos/avajs/ava/issues/comments/230205296","html_url":"https://github.com/avajs/ava/issues/631#issuecomment-230205296","issue_url":"https://api.github.com/repos/avajs/ava/issues/631","id":230205296,"user":{"login":"tjoskar","id":1525612,"avatar_url":"https://avatars.githubusercontent.com/u/1525612?v=3","gravatar_id":"","url":"https://api.github.com/users/tjoskar","html_url":"https://github.com/tjoskar","followers_url":"https://api.github.com/users/tjoskar/followers","following_url":"https://api.github.com/users/tjoskar/following{/other_user}","gists_url":"https://api.github.com/users/tjoskar/gists{/gist_id}","starred_url":"https://api.github.com/users/tjoskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjoskar/subscriptions","organizations_url":"https://api.github.com/users/tjoskar/orgs","repos_url":"https://api.github.com/users/tjoskar/repos","events_url":"https://api.github.com/users/tjoskar/events{/privacy}","received_events_url":"https://api.github.com/users/tjoskar/received_events","type":"User","site_admin":false},"created_at":"2016-07-04T05:00:45Z","updated_at":"2016-07-04T05:00:45Z","body":"@stoffeastrom, are you sure? If I do the same and adds some typescript specific code like an `enum`, I get a syntax error:\r\n<details>\r\n  <summary>SyntaxError</summary>\r\n  ```javascript\r\n1. Uncaught Exception\r\n   SyntaxError: test.ts: Unexpected token (3:5)\r\n  1 | import { test } from 'ava';\r\n  2 |\r\n> 3 | enum testEnum {\r\n    |      ^\r\n  4 |     a = 1\r\n  5 | }\r\n  6 |\r\nat Parser.pp.raise (node_modules/babylon/lib/parser/location.js:22:13)\r\n...\r\n  ```\r\n</details>\r\n\r\nHowever, if I try to run the following typescript test:\r\n```javascript\r\nimport { test } from 'ava';\r\n\r\nlet num = 1;\r\n\r\ntest('should login', t => {\r\n    num = '1';\r\n    t.is(num, '1');\r\n});\r\n```\r\n\r\nI get the following error:\r\n```\r\ntest.ts (6,5): Type 'string' is not assignable to type 'number'. (2322)\r\ntest.ts (7,5): The type argument for type parameter 'U' cannot be inferred from the usage. Consider specifying the type arguments explicitly.\r\n```\r\n\r\nSo it seems to me like babel kicks in first and then the typescript compiler. We need a way to \"turn of\" babel."}}
{"actor":{"display_login":"tjoskar"}}