{"action":"opened","issue":{"url":"https://api.github.com/repos/acvetkov/sinon-chrome/issues/26","labels_url":"https://api.github.com/repos/acvetkov/sinon-chrome/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/acvetkov/sinon-chrome/issues/26/comments","events_url":"https://api.github.com/repos/acvetkov/sinon-chrome/issues/26/events","html_url":"https://github.com/acvetkov/sinon-chrome/issues/26","id":130109939,"number":26,"title":"chrome.flush does not flush withArgs stubs","user":{"login":"acvetkov","id":4044846,"avatar_url":"https://avatars.githubusercontent.com/u/4044846?v=3","gravatar_id":"","url":"https://api.github.com/users/acvetkov","html_url":"https://github.com/acvetkov","followers_url":"https://api.github.com/users/acvetkov/followers","following_url":"https://api.github.com/users/acvetkov/following{/other_user}","gists_url":"https://api.github.com/users/acvetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/acvetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acvetkov/subscriptions","organizations_url":"https://api.github.com/users/acvetkov/orgs","repos_url":"https://api.github.com/users/acvetkov/repos","events_url":"https://api.github.com/users/acvetkov/events{/privacy}","received_events_url":"https://api.github.com/users/acvetkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"acvetkov","id":4044846,"avatar_url":"https://avatars.githubusercontent.com/u/4044846?v=3","gravatar_id":"","url":"https://api.github.com/users/acvetkov","html_url":"https://github.com/acvetkov","followers_url":"https://api.github.com/users/acvetkov/followers","following_url":"https://api.github.com/users/acvetkov/following{/other_user}","gists_url":"https://api.github.com/users/acvetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/acvetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acvetkov/subscriptions","organizations_url":"https://api.github.com/users/acvetkov/orgs","repos_url":"https://api.github.com/users/acvetkov/repos","events_url":"https://api.github.com/users/acvetkov/events{/privacy}","received_events_url":"https://api.github.com/users/acvetkov/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2016-01-31T10:20:32Z","updated_at":"2016-01-31T10:20:32Z","closed_at":null,"body":"```js\r\nvar chrome = require('sinon-chrome');\r\n\r\nchrome.runtime.getUrl.returns('my-domain.com');\r\nchrome.runtime.getUrl(); // my-domain.com\r\n\r\nchrome.flush()\r\nchrome.runtime.getUrl(); // undefined\r\n```\r\n\r\nBut if we flush stubs, which has withArgs behavior, `chrome.flush` does not work.\r\n\r\n```js\r\nvar chrome = require('sinon-chrome');\r\n\r\nchrome.runtime.getUrl.withArgs(1).returns('my-domain1.com');\r\nchrome.runtime.getUrl.withArgs(2).returns('my-domain2.com');\r\nchrome.runtime.getUrl(1); // my-domain1.com\r\nchrome.runtime.getUrl(2); // my-domain2.com\r\n\r\nchrome.flush()\r\nchrome.runtime.getUrl(1); // my-domain1.com\r\nchrome.runtime.getUrl(2); // my-domain2.com\r\n```"}}