Open serviewcare opened 10 years ago
You need to stub your templates. You are running unit tests, you do not want to load meteor for every single test.
Template.stub('cr_notification_area')
You may consider trying out my oneliner:
grep -r --include *.html "<template name=" app/ | awk -F"<template name=" '{ print $2 }' | cut -d">" -f1 | xargs -I template echo "Template.stub(\""template"\");"
This will generate all template stubs and display them on console:
/scratch/rtd-laika-meteor-boilerplate$ grep -r --include *.html "<template name=" app/ | awk -F"<template name=" '{ print $2 }' | cut -d">" -f1 | xargs -I template echo "Template.stub(\""template"\");"
Template.stub("searchbar"); Template.stub("header"); Template.stub("footer"); Template.stub("notFound"); Template.stub("home"); Template.stub("basicLayout"); Template.stub("slimLayout");
I have an alias in bashrc for that.
Interesting, this should probably just happen automagically. I'll look at adding this in. Thanks!
A pull request is always welcome of course :)
Great, thanks!
So, I'm trying to run rtd on my system for the first time. For some reason I'm getting a load of errors on my Templates:
TypeError: 'undefined' is not an object (evaluating 'Template.cr_notification_area') at /home/jthomas/git-projects/app/client/care_recipient_client/cr_notification_area.js:6
Every single one of them is on line 6 for every template file, and seem to show up at random for all of my templates.
If I evaluate the same templates from JS console, they return HTML, and work just fine in my application.