{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1450","repository_url":"https://api.github.com/repos/ReactiveX/rxjs","labels_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1450/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1450/comments","events_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1450/events","html_url":"https://github.com/ReactiveX/rxjs/issues/1450","id":139808592,"node_id":"MDU6SXNzdWUxMzk4MDg1OTI=","number":1450,"title":"switch operator test case behavior with promises","user":{"login":"kwonoj","id":1210596,"node_id":"MDQ6VXNlcjEyMTA1OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/1210596?v=4","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},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-03-10T07:21:31Z","updated_at":"2018-06-07T06:41:20Z","closed_at":"2016-04-06T04:43:24Z","author_association":"MEMBER","body":"This seems test case design than operator behavior, \n\n``` js\nObservable.of<any>(Promise.resolve(1), Promise.reject(2), Promise.resolve(3))\n      .switch()\n      .subscribe((x: number) => {\n        expect(x).toBe(3);\n      }, (err: any) => {\n        expect(err).toBe(2); //this is not actually asserted\n      }, () => {\n        done();\n      });\n```\n\nseems promise elements are being emitted before either it's being resolved or rejected. (and if `error()` is actually being called, `complete` should not be called)\n\n@staltz , is this expected test design? (asking you since it was added with your commit looking at [history](https://github.com/ReactiveX/RxJS/commit/57ad9861baf722fb7c5d07858faf70ed4354eab8#diff-7d20220faf9ec300584166298c9da813R155))\n"},"comment":{"url":"https://api.github.com/repos/ReactiveX/rxjs/issues/comments/395310524","html_url":"https://github.com/ReactiveX/rxjs/issues/1450#issuecomment-395310524","issue_url":"https://api.github.com/repos/ReactiveX/rxjs/issues/1450","id":395310524,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTMxMDUyNA==","user":{"login":"lock[bot]","id":33595554,"node_id":"MDM6Qm90MzM1OTU1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-06-07T06:41:20Z","updated_at":"2018-06-07T06:41:20Z","author_association":"NONE","body":"This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.\n"}}
{"actor":{"display_login":"lock"}}