{"action":"created","issue":{"url":"https://api.github.com/repos/Updater/jasmine-fail-fast/issues/6","repository_url":"https://api.github.com/repos/Updater/jasmine-fail-fast","labels_url":"https://api.github.com/repos/Updater/jasmine-fail-fast/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Updater/jasmine-fail-fast/issues/6/comments","events_url":"https://api.github.com/repos/Updater/jasmine-fail-fast/issues/6/events","html_url":"https://github.com/Updater/jasmine-fail-fast/issues/6","id":146645953,"number":6,"title":"Documentation not clear how to configure as a helper for grunt-contrib-jasmine","user":{"login":"jeremyhill-up","id":6663634,"avatar_url":"https://avatars.githubusercontent.com/u/6663634?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyhill-up","html_url":"https://github.com/jeremyhill-up","followers_url":"https://api.github.com/users/jeremyhill-up/followers","following_url":"https://api.github.com/users/jeremyhill-up/following{/other_user}","gists_url":"https://api.github.com/users/jeremyhill-up/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyhill-up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyhill-up/subscriptions","organizations_url":"https://api.github.com/users/jeremyhill-up/orgs","repos_url":"https://api.github.com/users/jeremyhill-up/repos","events_url":"https://api.github.com/users/jeremyhill-up/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyhill-up/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-07T14:39:37Z","updated_at":"2016-04-08T03:07:53Z","closed_at":null,"body":"I'm trying to get this into my grunt-contrib-jasmine config and I'm struggling to set it up as a helper.  The documentation reads:\r\n\r\n> grunt-contrib-jasmine\r\n> Set up as a helper, optionally overriding the default helpers path.\r\n\r\nI tried both listing the jasmine-fail-fast.js file directly as a helper in my Grunt config:\r\n```\r\n},\r\njasmine: {\r\n  default: {\r\n    src: ['<%= dirs.dest %>/<%= app.filename %>.js'],\r\n    options: {\r\n      summary: true,\r\n      specs: 'specs/javascripts/*.js',\r\n      ...\r\n      helpers: [\r\n        'node_modules/jasmine-fail-fast/dist/jasmine-fail-fast.js',\r\n        ...\r\n      ],\r\n      vendor: [\r\n      ...\r\n      ],\r\n      junit: {\r\n        path: 'target/test-results/',\r\n        consolidate: false\r\n      }\r\n    }\r\n  }\r\n},\r\n```\r\n\r\n\r\n as well as making a helper file that contained the snippet:\r\n\r\n```\r\nvar failFast = require('jasmine-fail-fast');\r\njasmine.getEnv().addReporter(failFast.init());\r\n\r\n```\r\n\r\nI get ReferenceErrors either way, about 'require' or 'exports' not being defined, ostensibly because grunt-contrib-jasmine aren't running the helpers in a node context or whatever.  Sorry, not sure what terminology to use :)\r\n\r\nI'm using \"grunt-contrib-jasmine\": 1.0.1 which I believe runs Jasmine 2.2.0 by default.\r\n\r\nAnyway, what am I missing in the docs?"},"comment":{"url":"https://api.github.com/repos/Updater/jasmine-fail-fast/issues/comments/207191274","html_url":"https://github.com/Updater/jasmine-fail-fast/issues/6#issuecomment-207191274","issue_url":"https://api.github.com/repos/Updater/jasmine-fail-fast/issues/6","id":207191274,"user":{"login":"pmowrer","id":356320,"avatar_url":"https://avatars.githubusercontent.com/u/356320?v=3","gravatar_id":"","url":"https://api.github.com/users/pmowrer","html_url":"https://github.com/pmowrer","followers_url":"https://api.github.com/users/pmowrer/followers","following_url":"https://api.github.com/users/pmowrer/following{/other_user}","gists_url":"https://api.github.com/users/pmowrer/gists{/gist_id}","starred_url":"https://api.github.com/users/pmowrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmowrer/subscriptions","organizations_url":"https://api.github.com/users/pmowrer/orgs","repos_url":"https://api.github.com/users/pmowrer/repos","events_url":"https://api.github.com/users/pmowrer/events{/privacy}","received_events_url":"https://api.github.com/users/pmowrer/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T03:07:53Z","updated_at":"2016-04-08T03:07:53Z","body":"I agree the docs are vague, but it sounds like you're doing everything right in using a helper file (which is what the docs are trying to convey, poorly). Where did you place the helper file? What errors did you receive specifically with the helper file?"}}