x-tag / core

The Heart of X-Tag
http://x-tag.github.io/
Other
1.25k stars 151 forks source link

Test cases for prototype (and some linter cleaning) #157

Open admosity opened 8 years ago

admosity commented 8 years ago

Added some test cases for using prototype.

  1. Test case for method override (more of an example than spec).
  2. Test case for propagating content when using prototype.

image

Commenting out

expect(elementB2.firstElementChild.nodeName.toLowerCase()).toEqual('span');

passes the test. image

admosity commented 8 years ago

Added some test cases for mixins, but can't seem to replicate the issue I'm having. I think in my case the lifecycle triggers from the mixins aren't firing. Will add some test cases with lifecycle hooks.

admosity commented 8 years ago

image

The lifecycle hooks are not triggering when using a prototype with mixins.

csuwildcat commented 8 years ago

I have retooled the mixin section of the test spec to cover your cases (I think). If there are any outstanding, I will gladly accept a new commit with any I may have missed :)

csuwildcat commented 7 years ago

I believe I incorporated the meat of this into the code - if not, let me know and I will address the remaining.