vkz/bemhtml-syntax

Add tests for bem-xjst4 compatibility flags

vkz opened this issue · 1 comments

vkz commented
  • assertHasBlock assert that every template has sub-predicate matching block
  • assertNoThisElem assert there're no predicates matching this.elem bem/bem-xjst#89
  • applySetsMode assert that every apply sets the mode as its first argument bem/bem-xjst#91
  • applyCheckFields warn when apply assigns block, elem, mods, elemMods bem/bem-xjst#73
  • returnFromDef ensure there's always return in def mode. Insert return '' when there is none
  • assertNoBuf assert this._buf is never used in templates
vkz commented

applySetsMode and applyCheckFields are just checks that only warn, never assert. Both work but I'm not adding them to test-suite explicitly (for now).