Permalink
Browse files

Test for styles and states

  • Loading branch information...
koenbok committed Jul 15, 2016
1 parent c13d10a commit 11417727fa25320b528790493eba74012d583a96
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/tests/LayerStatesTest.coffee
@@ -87,6 +87,22 @@ describe "LayerStates", ->
layer.states.switchInstant('default')
layer.html.should.equal "fff"
it "should not change style when going back to default", ->
layer = new Layer
layer.style.fontFamily = "Arial"
layer.style.fontFamily.should.equal "Arial"
layer.states.add
test: {x: 500}
layer.states.switchInstant("test")
layer.x.should.equal 500
layer.style.fontFamily = "Helvetica"
layer.style.fontFamily.should.equal "Helvetica"
layer.states.switchInstant("default")
layer.x.should.equal 0
layer.style.fontFamily.should.equal "Helvetica"
describe "Properties", ->

0 comments on commit 1141772

Please sign in to comment.