{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/lit-element/issues/125","repository_url":"https://api.github.com/repos/Polymer/lit-element","labels_url":"https://api.github.com/repos/Polymer/lit-element/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/lit-element/issues/125/comments","events_url":"https://api.github.com/repos/Polymer/lit-element/issues/125/events","html_url":"https://github.com/Polymer/lit-element/issues/125","id":341075915,"node_id":"MDU6SXNzdWUzNDEwNzU5MTU=","number":125,"title":"Testing with Jest is not possible","user":{"login":"yanishoss","id":31389193,"node_id":"MDQ6VXNlcjMxMzg5MTkz","avatar_url":"https://avatars0.githubusercontent.com/u/31389193?v=4","gravatar_id":"","url":"https://api.github.com/users/yanishoss","html_url":"https://github.com/yanishoss","followers_url":"https://api.github.com/users/yanishoss/followers","following_url":"https://api.github.com/users/yanishoss/following{/other_user}","gists_url":"https://api.github.com/users/yanishoss/gists{/gist_id}","starred_url":"https://api.github.com/users/yanishoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanishoss/subscriptions","organizations_url":"https://api.github.com/users/yanishoss/orgs","repos_url":"https://api.github.com/users/yanishoss/repos","events_url":"https://api.github.com/users/yanishoss/events{/privacy}","received_events_url":"https://api.github.com/users/yanishoss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-13T16:06:43Z","updated_at":"2018-07-16T14:33:34Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nIf you are asking a question rather than filing a bug, try one of these instead:\r\n- StackOverflow (https://stackoverflow.com/questions/tagged/polymer)\r\n- Polymer Slack Channel (https://bit.ly/polymerslack)\r\n- Mailing List (https://groups.google.com/forum/#!forum/polymer-dev)\r\n-->\r\n<!-- Instructions For Filing a Bug: https://github.com/Polymer/lit-element/blob/master/CONTRIBUTING.md#filing-bugs -->\r\n### Description\r\n<!-- Example: Error thrown when calling `appendChild` on Lit element -->\r\n\r\n#### Live Demo\r\n<!-- Stackblitz starting point (fork and edit) -->\r\nhttps://stackblitz.com/edit/lit-element-example?file=index.js\r\n<!-- glitch.me starting point (remix and edit -- must be logged in to persist!) -->\r\nhttps://glitch.com/edit/#!/hello-lit-element?path=index.html:1:0\r\n<!-- ...or provide your own repro URL -->\r\n\r\n#### Steps to Reproduce\r\n<!--\r\nExample:\r\n\r\n1. Create `my-element`\r\n2. Append `my-element` to document.body\r\n3. Create `div`.\r\n4. Append `div` to `my-element`\r\n-->\r\n\r\n\r\n#### Expected Results\r\n<!-- Example: No error is throw -->\r\n\r\n#### Actual Results\r\n<!-- Example: Error is thrown -->\r\n\r\n### Browsers Affected\r\n<!-- Check all that apply -->\r\n- [ ] Chrome\r\n- [ ] Firefox\r\n- [ ] Edge\r\n- [ ] Safari 11\r\n- [ ] Safari 10\r\n- [ ] IE 11\r\n\r\n### Versions\r\n<!--\r\n`npm ls` will show the version of webcomponents.js and lit-element\r\n-->\r\n- lit-element: vX.X.X\r\n- webcomponents: vX.X.X\r\nI got a problem while testing my library (github.com/yanishoss/polymer-toolkit) with Jest.\r\n\r\nJest doesn't support ES6 modules and @polymer/lit-element is not compiled,\r\nthereby i got this message: \r\n\r\n FAIL  tests/redux.test.ts\r\n  ● Test suite failed to run\r\n    Jest encountered an unexpected token\r\n    This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.\r\n    By default, if Jest sees a Babel config, it will use that to transform your files, ignoring \"node_modules\".\r\n    Here's what you can do:\r\n     • To have some of your \"node_modules\" files transformed, you can specify a custom \"transformIgnorePatterns\" in your config.\r\n     • If you need a custom transformation specify a \"transform\" option in your config.\r\n     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the \"moduleNameMapper\" config option.\r\n    You'll find more details and examples of these config options in the docs:\r\n    https://jestjs.io/docs/en/configuration.html\r\n    Details:\r\n    /home/travis/build/yanishoss/polymer-toolkit/node_modules/@polymer/lit-element/lit-element.js:1\r\n    ({\"Object.<anonymous>\":function(module,exports,require,__dirname,__filename,global,jest){import { PropertiesMixin } from '@polymer/polymer/lib/mixins/properties-mixin.js';\r\n                                                                                                    ^\r\n    SyntaxError: Unexpected token {\r\n    > 1 | import { html } from '@polymer/lit-element';\r\n        | ^\r\n      2 | import { Dispatch } from 'redux';\r\n      3 | import { ReduxLitElement } from '../src';\r\n      4 | import { IAction, IState, store, Type } from './store';\r\n      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)\r\n      at Object.<anonymous> (tests/redux.test.ts:1:1)\r\n"},"comment":{"url":"https://api.github.com/repos/Polymer/lit-element/issues/comments/405267892","html_url":"https://github.com/Polymer/lit-element/issues/125#issuecomment-405267892","issue_url":"https://api.github.com/repos/Polymer/lit-element/issues/125","id":405267892,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTI2Nzg5Mg==","user":{"login":"Lodin","id":8037479,"node_id":"MDQ6VXNlcjgwMzc0Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/8037479?v=4","gravatar_id":"","url":"https://api.github.com/users/Lodin","html_url":"https://github.com/Lodin","followers_url":"https://api.github.com/users/Lodin/followers","following_url":"https://api.github.com/users/Lodin/following{/other_user}","gists_url":"https://api.github.com/users/Lodin/gists{/gist_id}","starred_url":"https://api.github.com/users/Lodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lodin/subscriptions","organizations_url":"https://api.github.com/users/Lodin/orgs","repos_url":"https://api.github.com/users/Lodin/repos","events_url":"https://api.github.com/users/Lodin/events{/privacy}","received_events_url":"https://api.github.com/users/Lodin/received_events","type":"User","site_admin":false},"created_at":"2018-07-16T14:33:33Z","updated_at":"2018-07-16T14:33:33Z","author_association":"NONE","body":"@yanishoss, @Kirtscheva, do you use any Jest transformers to like [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest) or [ts-jest](https://github.com/kulshekhar/ts-jest) to convert `import` tokens to `require` to make Jest work?"}}
{"actor":{"display_login":"Lodin"}}