I'm reading through the online book Meteor Testing and am a bit concerned about how it says you should structure your app. It says to create an object in the global namespace called "App" and append submodules as needed, like this:
App = {
Services: {
func1: [some function]
func2: [some function]
...
},
Collections: {
func1: [some function]
func2: [some function]
...
}
...
}
My concerns are:
- Will this negatively impact the security of my application?
- Where and when should I defined functions within the app namespace? Adding all of them in one place would quickly get overwhelming.
- Should I do this for all of the functions I want to unit test? If not, how do I access functions that I have defined within the scope of a template's javascript file?
If any of you could point me to additional resources on testing in meteor, I'd love to take a look at what other people suggest. Thanks.
Aucun commentaire:
Enregistrer un commentaire