This repository was archived by the owner on Oct 20, 2021. It is now read-only.
This repository was archived by the owner on Oct 20, 2021. It is now read-only.
Angular Tutorial Step 11.6 - 11.10 Errors #58
Open
Description
On Mac OS X I'm running into the following error when trying to do the tutorial testing steps (11.6 & 11.7) that involve angular mocks
ReferenceError: window is not defined
at Object.<anonymous> (/Users/theuser/simple-todos/node_modules/angular-mocks/angular-mocks.js:3006:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at npmRequire (/private/var/folders/bk/vc02hq9x7_b5sksrdkjj4t240000gn/T/meteor-test-run1c7hepa/.meteor/local/build/programs/server/npm-require.js:121:10)
at Module.useNode (packages/modules-runtime.js:453:20)
at fileEvaluate (packages/modules-runtime.js:157:20)
If I comment out the angular-mocks import, I get the following error:
Error: Cannot find module '../todosList'
at require (packages/modules-runtime.js:95:19)
at meteorInstall.imports.components.todosList.todosList.tests.js (imports/components/todosList/todosList.tests.js:7:1)
at fileEvaluate (packages/modules-runtime.js:158:9)
at require (packages/modules-runtime.js:92:16)
at /private/var/folders/bk/vc02hq9x7_b5sksrdkjj4t240000gn/T/meteor-test-run1c7hepa/.meteor/local/build/programs/server/app/app.js:210:1
at /private/var/folders/bk/vc02hq9x7_b5sksrdkjj4t240000gn/T/meteor-test-run1c7hepa/.meteor/local/build/programs/server/boot.js:283:10
at Array.forEach (native)
at Function._.each._.forEach (/Users/theuser/.meteor/packages/meteor-tool/.1.3.1.nwdv3u++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /private/var/folders/bk/vc02hq9x7_b5sksrdkjj4t240000gn/T/meteor-test-run1c7hepa/.meteor/local/build/programs/server/boot.js:133:5
And, of course, commenting out the todosList import as well at least lets the testrunner proceed, but the tests error since the component it's testing isn't available.
Don't know enough about meteor/angular/mocha yet to have any idea why this is failing