{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/6827","repository_url":"https://api.github.com/repos/meteor/meteor","labels_url":"https://api.github.com/repos/meteor/meteor/issues/6827/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/6827/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/6827/events","html_url":"https://github.com/meteor/meteor/issues/6827","id":148770652,"number":6827,"title":"[1.3.2] Package testing not working","user":{"login":"clayne11","id":2831444,"avatar_url":"https://avatars.githubusercontent.com/u/2831444?v=3","gravatar_id":"","url":"https://api.github.com/users/clayne11","html_url":"https://github.com/clayne11","followers_url":"https://api.github.com/users/clayne11/followers","following_url":"https://api.github.com/users/clayne11/following{/other_user}","gists_url":"https://api.github.com/users/clayne11/gists{/gist_id}","starred_url":"https://api.github.com/users/clayne11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clayne11/subscriptions","organizations_url":"https://api.github.com/users/clayne11/orgs","repos_url":"https://api.github.com/users/clayne11/repos","events_url":"https://api.github.com/users/clayne11/events{/privacy}","received_events_url":"https://api.github.com/users/clayne11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/confirmed","name":"confirmed","color":"e10c02"},{"url":"https://api.github.com/repos/meteor/meteor/labels/in%20progress","name":"in progress","color":"ededed"},{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Testing","name":"Project:Testing","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"benjamn","id":5750,"avatar_url":"https://avatars.githubusercontent.com/u/5750?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/meteor/meteor/milestones/11","html_url":"https://github.com/meteor/meteor/milestones/Release%201.3.3","labels_url":"https://api.github.com/repos/meteor/meteor/milestones/11/labels","id":1711027,"number":11,"title":"Release 1.3.3","description":null,"creator":{"login":"benjamn","id":5750,"avatar_url":"https://avatars.githubusercontent.com/u/5750?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-04-15T23:03:08Z","updated_at":"2016-04-15T23:03:08Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-04-15T21:11:52Z","updated_at":"2016-04-16T00:15:36Z","closed_at":null,"body":"I'm having issues trying to test packages.\r\n\r\nWhen I run:\r\n\r\n`meteor test-packages --driver-package practicalmeteor:mocha casalova:user-availability --port 3000`\r\n\r\nI get a crash telling me:\r\n\r\n```\r\nW20160415-17:08:20.346(-4)? (STDERR) /Users/clayne/.meteor/packages/meteor-tool/.1.3.2.1ki5fk2++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267\r\nW20160415-17:08:20.346(-4)? (STDERR) \t\t\t\t\t\tthrow(ex);\r\nW20160415-17:08:20.346(-4)? (STDERR) \t\t\t\t\t\t      ^\r\nW20160415-17:08:20.363(-4)? (STDERR) Error: Can't find npm module 'lodash/memoize'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?\r\nW20160415-17:08:20.364(-4)? (STDERR)     at Object.Npm.require (/private/var/folders/5d/7cyh0l9s72z9xqsyjwfrz0cw0000gn/T/meteor-test-run1wmvy2i/.meteor/local/build/programs/server/boot.js:195:17)\r\nW20160415-17:08:20.364(-4)? (STDERR)     at options.fallback (packages/modules-runtime/modules-runtime.js:21:1)\r\nW20160415-17:08:20.364(-4)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:81:1)\r\nW20160415-17:08:20.364(-4)? (STDERR)     at meteorInstall.node_modules.meteor.casalova:core.both.casalova_ui_utils.js (packages/casalova:core/both/casalova_ui_utils.js:3:1)\r\nW20160415-17:08:20.364(-4)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)\r\nW20160415-17:08:20.364(-4)? (STDERR)     at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)\r\nW20160415-17:08:20.364(-4)? (STDERR)     at /private/var/folders/5d/7cyh0l9s72z9xqsyjwfrz0cw0000gn/T/meteor-test-run1wmvy2i/.meteor/local/build/programs/server/packages/casalova_core.js:322:1\r\nW20160415-17:08:20.364(-4)? (STDERR)     at /private/var/folders/5d/7cyh0l9s72z9xqsyjwfrz0cw0000gn/T/meteor-test-run1wmvy2i/.meteor/local/build/programs/server/packages/casalova_core.js:336:3\r\nW20160415-17:08:20.364(-4)? (STDERR)     at /private/var/folders/5d/7cyh0l9s72z9xqsyjwfrz0cw0000gn/T/meteor-test-run1wmvy2i/.meteor/local/build/programs/server/boot.js:283:10\r\nW20160415-17:08:20.364(-4)? (STDERR)     at Array.forEach (native)\r\n=> Exited with code: 8\r\n=> Your application is crashing. Waiting for file change.\r\n```\r\n\r\nI import `lodash/memoize` in one of my packages. If I remove that import, the next `import` of an Npm module that i have in my code fails in exactly the same way.\r\n\r\nIt looks like the test driver is not using my `node_modules` folder from the root of my project."},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/210694217","html_url":"https://github.com/meteor/meteor/issues/6827#issuecomment-210694217","issue_url":"https://api.github.com/repos/meteor/meteor/issues/6827","id":210694217,"user":{"login":"clayne11","id":2831444,"avatar_url":"https://avatars.githubusercontent.com/u/2831444?v=3","gravatar_id":"","url":"https://api.github.com/users/clayne11","html_url":"https://github.com/clayne11","followers_url":"https://api.github.com/users/clayne11/followers","following_url":"https://api.github.com/users/clayne11/following{/other_user}","gists_url":"https://api.github.com/users/clayne11/gists{/gist_id}","starred_url":"https://api.github.com/users/clayne11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clayne11/subscriptions","organizations_url":"https://api.github.com/users/clayne11/orgs","repos_url":"https://api.github.com/users/clayne11/repos","events_url":"https://api.github.com/users/clayne11/events{/privacy}","received_events_url":"https://api.github.com/users/clayne11/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T00:15:36Z","updated_at":"2016-04-16T00:15:36Z","body":"For me,  the workaround basically completely defeats the purpose of unit tests. If the tests take longer than a couple of seconds to run when I make a change I'm simply not going to run them and they're not going to be effective.\r\n\r\nIn the regular Javascript community we can run hundreds of tests in a matter of seconds. With Meteor, even the package unit tests take a minute or so to start up. I haven't been able to test re-run speeds because of this issue but I doubt it's particularly fast.\r\n\r\nCombine that with the fact that I have around 120 packages in my app and even unit testing becomes a nightmare that takes 20-30 minutes. All of this can be resolved by fulling moving to an Npm solution but I think that's still quite a ways away. \r\n\r\nA great stopgap would be to build all the Meteor packages into Npm packages and allow us to run regular unit tests on the built packages. That way we can build the packages once, then employ a test runner like regular `mocha` to run our unit tests extremely quickly. I think it would only work for packages that use explicit `export` and `import` but that's still quite reasonable.\r\n\r\nI'm not 100% familiar with the Meteor build system so I'm not sure if what I'm suggesting is currently possible. Any thoughts on this?"}}