{"action":"closed","issue":{"url":"https://api.github.com/repos/curit/ember-cli-yadda/issues/15","repository_url":"https://api.github.com/repos/curit/ember-cli-yadda","labels_url":"https://api.github.com/repos/curit/ember-cli-yadda/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/curit/ember-cli-yadda/issues/15/comments","events_url":"https://api.github.com/repos/curit/ember-cli-yadda/issues/15/events","html_url":"https://github.com/curit/ember-cli-yadda/issues/15","id":123008436,"number":15,"title":"using ember-cli-yadda with ember-cli-blanket 'Error: Could not find module yadda'","user":{"login":"sfbwalder","id":11080956,"avatar_url":"https://avatars.githubusercontent.com/u/11080956?v=3","gravatar_id":"","url":"https://api.github.com/users/sfbwalder","html_url":"https://github.com/sfbwalder","followers_url":"https://api.github.com/users/sfbwalder/followers","following_url":"https://api.github.com/users/sfbwalder/following{/other_user}","gists_url":"https://api.github.com/users/sfbwalder/gists{/gist_id}","starred_url":"https://api.github.com/users/sfbwalder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfbwalder/subscriptions","organizations_url":"https://api.github.com/users/sfbwalder/orgs","repos_url":"https://api.github.com/users/sfbwalder/repos","events_url":"https://api.github.com/users/sfbwalder/events{/privacy}","received_events_url":"https://api.github.com/users/sfbwalder/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-12-18T19:08:55Z","updated_at":"2016-11-01T22:05:11Z","closed_at":"2016-11-01T22:05:11Z","body":"We have installed the latest versions of ember-cli-yadda and ember-cli-blanket, with ember-cli 1.13.8.  When running /tests without blanket coverage the BDD tests run fine.  When running /tests?coverage to enable blanket coverage, the BDD tests fail with:\n\n```\nDied on test #1     at Object.TestLoader.moduleLoadFailure (http://localhost:4200/assets/test-support.js:5854:11)\n    at Object.TestLoader.require (http://localhost:4200/assets/test-loader.js:31:14)\n    at Object.TestLoader.loadModules (http://localhost:4200/assets/test-loader.js:21:18)\n    at Function.TestLoader.load (http://localhost:4200/assets/test-loader.js:40:24)\n    at http://localhost:4200/assets/test-support.js:5863:16: Could not find module yadda@ 1 ms\nSource:     \nError: Could not find module yadda\n    at missingModule (http://localhost:4200/assets/vendor.js:125:11)\n    at requireModule (http://localhost:4200/assets/vendor.js:135:17)\n    at require (http://localhost:4200/assets/blanket-loader.js:128:16)\n    at http://localhost:4200/assets/sf-todo.js:1201:23\n    at mod.state (http://localhost:4200/assets/vendor.js:150:29)\n    at tryFinally (http://localhost:4200/assets/vendor.js:30:14)\n    at requireModule (http://localhost:4200/assets/vendor.js:148:5)\n    at require (http://localhost:4200/assets/blanket-loader.js:128:16)\n    at oldLoader (http://localhost:4200/assets/blanket-loader.js:84:13)\n    at Object._blanket.extend.utils.processFile (http://localhost:4200/assets/test-support.js:12100:17)\n```\n\nI'm not sure of the exact problem, but perhaps this is related.  [yadda-0.15.4](https://github.com/acuminous/yadda/blob/master/dist/yadda-0.15.4.js) sets the global 'require' to its own function when it is loaded.  This changes it from pointing to the usual ember-cli loader.js require function.  This doesn't seem to  be a problem when ember-cli-blanket coverage is off, although the global 'require' stays as the yadda function instead of the loader.js function for the rest of the load process.\n\nBut, when ember-cli-blanket coverage is on, ember-cli-blanket sets the global 'require' to its own function, which internally turn calls the global 'requirejs', which is the loader.js require function.\n- note it the add-on doing this, not blanket.js itself\n- normally the global 'require' and 'requirejs' both point to the loader.js function, but yadda changes that\n\nThat's a little confusing to explain, but its seems ember-cli-blanket ends up calling a different require function that what was used to load yadda.  If a different registry is used in each function, then 'yadda' may not be found.\n\nHas anyone else seen this?  Ideas on how to fix?\n"}}
{"actor":{"display_login":"sfbwalder"}}