{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/expect.js/issues/138","labels_url":"https://api.github.com/repos/Automattic/expect.js/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/expect.js/issues/138/comments","events_url":"https://api.github.com/repos/Automattic/expect.js/issues/138/events","html_url":"https://github.com/Automattic/expect.js/issues/138","id":88258656,"number":138,"title":"Value be Something OR SomethingElse","user":{"login":"alanjames1987","id":765326,"avatar_url":"https://avatars.githubusercontent.com/u/765326?v=3","gravatar_id":"","url":"https://api.github.com/users/alanjames1987","html_url":"https://github.com/alanjames1987","followers_url":"https://api.github.com/users/alanjames1987/followers","following_url":"https://api.github.com/users/alanjames1987/following{/other_user}","gists_url":"https://api.github.com/users/alanjames1987/gists{/gist_id}","starred_url":"https://api.github.com/users/alanjames1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanjames1987/subscriptions","organizations_url":"https://api.github.com/users/alanjames1987/orgs","repos_url":"https://api.github.com/users/alanjames1987/repos","events_url":"https://api.github.com/users/alanjames1987/events{/privacy}","received_events_url":"https://api.github.com/users/alanjames1987/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-14T22:30:51Z","updated_at":"2015-12-10T07:36:12Z","closed_at":null,"body":"I'm trying to test that a value is one value or another. In either case it's considered passing but I have not been able to figure out how to test for this.\r\n\r\nDoes expect.js support this sort of assertion and if not how should I go about testing for it?"},"comment":{"url":"https://api.github.com/repos/Automattic/expect.js/issues/comments/163523922","html_url":"https://github.com/Automattic/expect.js/issues/138#issuecomment-163523922","issue_url":"https://api.github.com/repos/Automattic/expect.js/issues/138","id":163523922,"user":{"login":"rafis","id":3502395,"avatar_url":"https://avatars.githubusercontent.com/u/3502395?v=3","gravatar_id":"","url":"https://api.github.com/users/rafis","html_url":"https://github.com/rafis","followers_url":"https://api.github.com/users/rafis/followers","following_url":"https://api.github.com/users/rafis/following{/other_user}","gists_url":"https://api.github.com/users/rafis/gists{/gist_id}","starred_url":"https://api.github.com/users/rafis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafis/subscriptions","organizations_url":"https://api.github.com/users/rafis/orgs","repos_url":"https://api.github.com/users/rafis/repos","events_url":"https://api.github.com/users/rafis/events{/privacy}","received_events_url":"https://api.github.com/users/rafis/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T07:36:12Z","updated_at":"2015-12-10T07:36:12Z","body":"Another variant:\r\n\r\n```javascript\r\nexpect.Assertion.prototype.stringOrArrayOfStrings = function() {\r\n    var ok;\r\n    if (typeof this.obj == 'string') {\r\n        ok = true;\r\n    } else if (this.obj instanceof Array) {\r\n        ok = true;\r\n        for(var i = 0; i < this.obj.length; ++i) {\r\n            if (typeof this.obj[i] != 'string') {\r\n                ok = false;\r\n                break;\r\n            }\r\n        }\r\n    }\r\n    this.assert(ok, function() {\r\n        return 'expected ' + expect.stringify(this.obj) + ' to be a string or an array of strings';\r\n    }, function() {\r\n        return 'expected ' + expect.stringify(this.obj) + ' to not be a string or an array of strings';\r\n    });\r\n};\r\nexpect(config.session.secret).to.be.stringOrArrayOfStrings();\r\n```"}}