{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1775","repository_url":"https://api.github.com/repos/ReactiveX/rxjs","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1775/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1775/comments","events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1775/events","html_url":"https://github.com/ReactiveX/rxjs/issues/1775","id":160721169,"number":1775,"title":"Productizing our test suite.","user":{"login":"blesh","id":1540597,"avatar_url":"https://avatars.githubusercontent.com/u/1540597?v=3","gravatar_id":"","url":"https://api.github.com/users/blesh","html_url":"https://github.com/blesh","followers_url":"https://api.github.com/users/blesh/followers","following_url":"https://api.github.com/users/blesh/following{/other_user}","gists_url":"https://api.github.com/users/blesh/gists{/gist_id}","starred_url":"https://api.github.com/users/blesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blesh/subscriptions","organizations_url":"https://api.github.com/users/blesh/orgs","repos_url":"https://api.github.com/users/blesh/repos","events_url":"https://api.github.com/users/blesh/events{/privacy}","received_events_url":"https://api.github.com/users/blesh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ReactiveX/rxjs/labels/priority:%20critical","name":"priority: critical","color":"eb6420"},{"url":"https://api.github.com/repos/ReactiveX/rxjs/labels/type:%20discussion","name":"type: discussion","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars.githubusercontent.com/u/1210596?v=3","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false},"assignees":[{"login":"kwonoj","id":1210596,"avatar_url":"https://avatars.githubusercontent.com/u/1210596?v=3","gravatar_id":"","url":"https://api.github.com/users/kwonoj","html_url":"https://github.com/kwonoj","followers_url":"https://api.github.com/users/kwonoj/followers","following_url":"https://api.github.com/users/kwonoj/following{/other_user}","gists_url":"https://api.github.com/users/kwonoj/gists{/gist_id}","starred_url":"https://api.github.com/users/kwonoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwonoj/subscriptions","organizations_url":"https://api.github.com/users/kwonoj/orgs","repos_url":"https://api.github.com/users/kwonoj/repos","events_url":"https://api.github.com/users/kwonoj/events{/privacy}","received_events_url":"https://api.github.com/users/kwonoj/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2016-06-16T17:51:37Z","updated_at":"2016-10-03T04:51:56Z","closed_at":null,"body":"It's of paramount importance that we create some sort of test suite out of our tools that is easy for people to consume. Right now we're doing a lot of \"magic\" in our tests (like patching `it` to flush the test scheduler and setting a global test scheduler).\r\n\r\nWe really need to productize what we have so others can benefit from it more easily. That might mean we need to change the API a little. Perhaps something like:\r\n\r\n```js\r\n\r\nimport { rxSyncTest } from 'rxjs-test';\r\n\r\ndescribe('some feature with observables', () => {\r\n  it('should do things', () => {\r\n    rxSyncTest((expect, { scheduler, hot, cold, time, etc }) => {\r\n        // set up any tests in here, it will execute _immediately_ and when this block is done,\r\n        // it will flush the scheduler\r\n\r\n        let s = hot('---a---b---c---|');\r\n        let e =     '---a---b---c---|');\r\n        expect(s).toBe(e);\r\n    });\r\n  });\r\n});\r\n\r\n```\r\n\r\nbasically, the API I'm thinking of is:\r\n\r\n```ts\r\ninterface Context {\r\n  scheduler: TestScheduler;\r\n  hot: (marbles: string) => HotObservable;\r\n  cold: (marbles: string) => ColdObservable;\r\n  time: (marbles: string) => number;\r\n}\r\n\r\nconst rxSyncTest = ((expect: expectObservableFunc, context: Context) => void) => void;\r\n```\r\n\r\nThis testing suite needs to:\r\n\r\n1. Be easy to use\r\n2. Be extensible\r\n3. Work with most major testing libraries (Jasmine, Mocha, QUnit, etc)\r\n\r\nThe names, of course, can be bikeshedded somewhat, but I'd like to get this out. I went with `rxSyncTest` because I want people to realize that this test is to be run in a totally synchronous way, and that they shouldn't be adding async code inside of it."},"comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments/251026268","html_url":"https://github.com/ReactiveX/rxjs/issues/1775#issuecomment-251026268","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1775","id":251026268,"user":{"login":"blesh","id":1540597,"avatar_url":"https://avatars.githubusercontent.com/u/1540597?v=3","gravatar_id":"","url":"https://api.github.com/users/blesh","html_url":"https://github.com/blesh","followers_url":"https://api.github.com/users/blesh/followers","following_url":"https://api.github.com/users/blesh/following{/other_user}","gists_url":"https://api.github.com/users/blesh/gists{/gist_id}","starred_url":"https://api.github.com/users/blesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blesh/subscriptions","organizations_url":"https://api.github.com/users/blesh/orgs","repos_url":"https://api.github.com/users/blesh/repos","events_url":"https://api.github.com/users/blesh/events{/privacy}","received_events_url":"https://api.github.com/users/blesh/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T04:51:56Z","updated_at":"2016-10-03T04:51:56Z","body":"FWIW @jayphelps has been doing some work in this area. Perhaps he can comment"}}
{"actor":{"display_login":"blesh"}}