Permalink
Browse files

Added test for the expected resulting behaviour of ‘layer.props’

  • Loading branch information...
nvh committed Sep 22, 2016
1 parent 3bf7734 commit aefab7cea7bfe30203180d462684d47c0abb8aaf
Showing with 28 additions and 0 deletions.
  1. +28 −0 test/tests/BaseClassTest.coffee
@@ -227,3 +227,31 @@ describe "BaseClass", ->
expect(TestClassD["_DefinedPropertiesKey"]?.a?.set).to.be.ok
expect(TestClassC["_DefinedPropertiesKey"]?.a?.set).to.not.be.ok
it "should not export a shared property name in props of in sibling subclasses", ->
class BaseSubClass extends Framer.BaseClass
@define "blabla",
get: -> "hoera"
set: -> "sdfsd"
class SiblingA extends BaseSubClass
@define "sharedProperty",
get: -> "getSiblingA"
set: -> "setSiblingA"
class SiblingB extends BaseSubClass
@define "sharedProperty",
get: -> "getSiblingB"
a = new SiblingA
b = new SiblingB
expect(a.sharedProperty).to.be.ok
expect(b.sharedProperty).to.be.ok
expect(a.props.sharedProperty).to.be.ok
expect(b.props.sharedProperty).to.not.be.ok
expect(a.blabla).to.be.ok
expect(b.blabla).to.be.ok
expect(a.props.blabla).to.be.ok
expect(b.props.blabla).to.be.ok

0 comments on commit aefab7c

Please sign in to comment.