Open snoryder8019 opened 3 months ago
Ran into a bit of a snag on this one. I've having some trouble getting the testing framework to play nicely with pre es6 syntax that's being used here. I started up a new branch to see if I can get the project converted over to the new style and then I'll continue on the testing branch.
Convention: /routes/adminFunctions/DIRNAMES/FILENAME.js First Test: /routes/adminFunctions/clubs/clubs.js
There are some custom functions in these, but theres a repeated standard of renderAddForm(), renderEditForm() , and the section/ upload-images EPs. Could we start Mocha here with clubs, but just run down the directory for the same naming conventions in a single expectation?
Expectations using clubs.js as my example: renderAddform - expect:200, expect formFields:obj, expect model:obj error expect renderEditForm/:id - expect:200, expect id: str, expect formFields:obj, expect model:obj section- expect:200,expect data:obj
bugs today: imagesArray(Club), uploadMultiple may not function as expected. I am wrapping these up today 8-28-14.
oops, i didnt finish the error expectations, but I think you get it bette than I.
Hold on this until October! Thanks. I need bugs and email for a solid launch.
Let me know how we can imporve the structer of testing I having gone through its errors to debug yet....run "npm test" for more info.
Lets begin testing any completed /routes/adminFunctions. package.json update "scripts" with "test" : "mocha ./bin/www"
Completed functions: webappSettings, subcriptions, clubs, sectionsSettings, notificcations, chatRoom, ChatMessage are all EP's that only need slight modeling adjustments.
dependency files would be models in /plugins/mongo/models && .../games /plugins/helpers/formHelper.js && imagesArray.js /routes/helpers/routeBuilder.js
views: /admin/admin.ejs && the matching subdirectories
ignore testing: videoLead, users, travel, videoProduction, help, permissions, When you get something built out, I need a walk through of what needs to happen if i make a change to a function that has a test written.
I hope to have an overhaul of the login portal soon and we can move onto testing that.