Move from embedded "fork" of jsHint to using grunt's jsHint module. Cleaned ALL jsHint errors. Added jasmine.util.isUndefined as alternative to extra careful protection against undefined clobbering
2.0 KiB
2.0 KiB
(Vague) Jasmine 2.0 Goals/(Guidelines)
- No globals!
- jasmine library is entirely inside
jasminenamespace - globals required for backwards compatibility should be added in
boot.js(EG, var describe = jasmine.getCurrentEnv().describe lives in boot.js)
- Don't use properties as getters. Use methods.
- Properties aren't encapsulated -- can be mutated, unsafe.
- Reporters get data objects (no methods).
- easier to refactor as needed
- More unit tests - fewer nasty integration tests
Remaining non-story-able work:
- Make a
TODOlist
Hard
- Finish killing Globals
- Guidelines:
- New objects can have constructors on
jasmine - Top level functions can live on
jasmine - Top level (i.e., any
jasmineproperty) should only be referenced inside theEnvconstructor
- New objects can have constructors on
- Spies
- isA functions:
- isArray_ - used in matchers and spies
- isString_
- isDOMNode_
- isA_
- unimplementedMethod_, used by PrettyPrinter
- jasmine.util should be util closure inside of env or something
- argsToArray is used for Spies and matching
- inherit is for how matchers are added/mixed in, reporters, and pretty printers
- formatException is used only inside Env/spec
- htmlEscape is for messages in matchers - should this be HTML at all? Is that * Matchers improvements
- move AddMatchers to Env & global (away from spec)
- make matchers unit-testable
- write doc on how to make a matcher
- Guidelines:
Easy
Other Topics
- Build - can we, should we redo the build and release process AGAIN in order to make it less arcane
- Want to add JSHint to build
- Use a standard JS/Node based concat system instead of custom Ruby?
- Docs
- JsDoc is a pain to host and RubyMine is pretty good at navigating. I say we kill it officially
- Docco has gone over well. Should we annotate all the sources and then have Pages be more complex, having tutorials and annotated source like Backbone? Are we small enough?
Build
- lib -> generated