DEV Community


Discussion on: Writing Jasmine Templates

nograviti profile image
Jonathan Schaffer Author

Passing "isTrue" allows the option change the assertion values. In practice all my assertion values are hardcoded to either true or false, since a case hasn't risen yet where this is needed.

As with all abstraction, layer rules and naming conventions will help keep things clear. While in theory having a single spec run doesEverythingWork() is feasible, everyone would have a hard time understanding what "everything" is and navigating the stack trace should anything break, would take a while and probably a lot of grep and sed filters.

The general folder structure I'm working with is:

  | templates
  | page_objects
  | specs

While the templates use the same modular pattern as page objects they should definitely be separate files.