{"action":"created","issue":{"url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/issues/97","repository_url":"https://api.github.com/repos/PillowPillow/ng2-webstorage","labels_url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/issues/97/comments","events_url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/issues/97/events","html_url":"https://github.com/PillowPillow/ng2-webstorage/issues/97","id":377774750,"node_id":"MDU6SXNzdWUzNzc3NzQ3NTA=","number":97,"title":"Unit tests with Decorators","user":{"login":"Darkein","id":4948463,"node_id":"MDQ6VXNlcjQ5NDg0NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4948463?v=4","gravatar_id":"","url":"https://api.github.com/users/Darkein","html_url":"https://github.com/Darkein","followers_url":"https://api.github.com/users/Darkein/followers","following_url":"https://api.github.com/users/Darkein/following{/other_user}","gists_url":"https://api.github.com/users/Darkein/gists{/gist_id}","starred_url":"https://api.github.com/users/Darkein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Darkein/subscriptions","organizations_url":"https://api.github.com/users/Darkein/orgs","repos_url":"https://api.github.com/users/Darkein/repos","events_url":"https://api.github.com/users/Darkein/events{/privacy}","received_events_url":"https://api.github.com/users/Darkein/received_events","type":"User","site_admin":false},"labels":[{"id":809925877,"node_id":"MDU6TGFiZWw4MDk5MjU4Nzc=","url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/labels/faq","name":"faq","color":"a398e0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-11-06T10:08:41Z","updated_at":"2018-11-07T13:37:55Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI'm using sesssionStorage decorator inside a service which I want to test.\r\n\r\nBecause i'm using jest for testing, I don't have access to SessionStorage. Can I mock the sessionStorage to use InMemoryStorage instead?\r\n\r\nI tried to inspire myself with your tests, but nothing worked ( I always have `ReferenceError: Storage is not defined`)\r\n\r\nThanks for your help"},"comment":{"url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/issues/comments/436625050","html_url":"https://github.com/PillowPillow/ng2-webstorage/issues/97#issuecomment-436625050","issue_url":"https://api.github.com/repos/PillowPillow/ng2-webstorage/issues/97","id":436625050,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjYyNTA1MA==","user":{"login":"Darkein","id":4948463,"node_id":"MDQ6VXNlcjQ5NDg0NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4948463?v=4","gravatar_id":"","url":"https://api.github.com/users/Darkein","html_url":"https://github.com/Darkein","followers_url":"https://api.github.com/users/Darkein/followers","following_url":"https://api.github.com/users/Darkein/following{/other_user}","gists_url":"https://api.github.com/users/Darkein/gists{/gist_id}","starred_url":"https://api.github.com/users/Darkein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Darkein/subscriptions","organizations_url":"https://api.github.com/users/Darkein/orgs","repos_url":"https://api.github.com/users/Darkein/repos","events_url":"https://api.github.com/users/Darkein/events{/privacy}","received_events_url":"https://api.github.com/users/Darkein/received_events","type":"User","site_admin":false},"created_at":"2018-11-07T13:37:55Z","updated_at":"2018-11-07T13:37:55Z","author_association":"NONE","body":"Hum, I can't mock LOCAL_STORAGE because it's injected in the import. I will not have time to create a repo right now, but I can send you the (horrible) [stack trace](https://gist.github.com/Darkein/9fd94e2bd9f6c2b1d95575843c905070#file-stacktrace-js).\r\n\r\n```\r\nReferenceError: Storage is not defined\r\n    at LocalStorageStrategy.ctorParameters (**\\node_modules\\ngx-webstorage\\bundles\\ng:\\ngx-webstorage\\lib\\strategies\\localStorage.ts:12:56)\r\n```\r\n\r\n"}}
{"actor":{"display_login":"Darkein"}}