{"action":"created","issue":{"url":"https://api.github.com/repos/justjohn/twig.js/issues/281","labels_url":"https://api.github.com/repos/justjohn/twig.js/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/justjohn/twig.js/issues/281/comments","events_url":"https://api.github.com/repos/justjohn/twig.js/issues/281/events","html_url":"https://github.com/justjohn/twig.js/issues/281","id":122592215,"number":281,"title":"Running tests in browser: arr.should.containEql is not a function","user":{"login":"plepe","id":249012,"avatar_url":"https://avatars.githubusercontent.com/u/249012?v=3","gravatar_id":"","url":"https://api.github.com/users/plepe","html_url":"https://github.com/plepe","followers_url":"https://api.github.com/users/plepe/followers","following_url":"https://api.github.com/users/plepe/following{/other_user}","gists_url":"https://api.github.com/users/plepe/gists{/gist_id}","starred_url":"https://api.github.com/users/plepe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plepe/subscriptions","organizations_url":"https://api.github.com/users/plepe/orgs","repos_url":"https://api.github.com/users/plepe/repos","events_url":"https://api.github.com/users/plepe/events{/privacy}","received_events_url":"https://api.github.com/users/plepe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-16T20:15:40Z","updated_at":"2015-12-18T20:48:19Z","closed_at":null,"body":"I'm currently trying the twig.js unit tests in different browsers. Beside a few small issues which I'll try to tackle soon, there's one problem which I can't figure out.\r\n\r\nThe tests for function \"random\" uses `should.containEql` to check whether the result is in the list of possible results. Apparently this function (containEql) is not available, when running the tests inside a browser (because the do work in node.js). I couldn't find any information about this on the interwebs ...\r\n\r\nThere are two versions of the resulting error message:\r\n\r\nMozilla Firefox 42, Chromium 47, Opera 12 report:\r\n```\r\nrandom ->\r\n    should return a random item from a traversable or array\r\n    arr.should.containEql is not a function\r\n    @http://HOST/PATH/twig.js/test/test.functions.js:285:1\r\n```\r\n\r\nSafari (Windows), Gnome Webbrowser, XXXTerm report:\r\n```\r\nrandom ->\r\nshould return a random item from a traversable or array ‣\r\nundefined is not a function (evaluating 'arr.should.containEql(twig({data: '{{ random(arr) }}'}).render({arr: arr}))')\r\nhttp://HOST/PATH/twig.js/test/test.functions.js:285:42\r\n```\r\n\r\nI think that's exactly the same error, but a different message.\r\n\r\nI haven't tested IE yet ..."},"comment":{"url":"https://api.github.com/repos/justjohn/twig.js/issues/comments/165894721","html_url":"https://github.com/justjohn/twig.js/issues/281#issuecomment-165894721","issue_url":"https://api.github.com/repos/justjohn/twig.js/issues/281","id":165894721,"user":{"login":"plepe","id":249012,"avatar_url":"https://avatars.githubusercontent.com/u/249012?v=3","gravatar_id":"","url":"https://api.github.com/users/plepe","html_url":"https://github.com/plepe","followers_url":"https://api.github.com/users/plepe/followers","following_url":"https://api.github.com/users/plepe/following{/other_user}","gists_url":"https://api.github.com/users/plepe/gists{/gist_id}","starred_url":"https://api.github.com/users/plepe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plepe/subscriptions","organizations_url":"https://api.github.com/users/plepe/orgs","repos_url":"https://api.github.com/users/plepe/repos","events_url":"https://api.github.com/users/plepe/events{/privacy}","received_events_url":"https://api.github.com/users/plepe/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T20:48:19Z","updated_at":"2015-12-18T20:48:19Z","body":"I was unsure myself, I've never used mocha or should.js before. I just browsed to the test/ directory (via https of course), and voila ..."}}