Cleaning up. No more bubbling events. All tests run fine. Following the Object.observe pattern (untested).
This commit is contained in:
@@ -73,11 +73,12 @@ describe "JsonFramework", ->
|
||||
console.log "" # TODO
|
||||
@yTest.run()
|
||||
|
||||
it "has a change listener", ()->
|
||||
### TODO
|
||||
it "has a update listener", ()->
|
||||
addName = false
|
||||
change = false
|
||||
change2 = 0
|
||||
@test_user.on 'addProperty', (eventname, property_name)->
|
||||
@test_user.on 'add', (eventname, property_name)->
|
||||
if property_name is 'x'
|
||||
addName = true
|
||||
@test_user.val('x',5)
|
||||
@@ -86,7 +87,7 @@ describe "JsonFramework", ->
|
||||
change = true
|
||||
@test_user.val('x', 6)
|
||||
@test_user.val('ins', "text", 'mutable')
|
||||
@test_user.on 'change', (eventname, property_name)->
|
||||
@test_user.on 'update', (eventname, property_name)->
|
||||
if property_name is 'ins'
|
||||
change2++
|
||||
@test_user.val('ins').insertText 4, " yay"
|
||||
@@ -94,6 +95,7 @@ describe "JsonFramework", ->
|
||||
expect(addName).to.be.ok
|
||||
expect(change).to.be.ok
|
||||
expect(change2).to.equal 8
|
||||
###
|
||||
|
||||
it "has a JsonTypeWrapper", ->
|
||||
y = this.yTest.getSomeUser().getSharedObject()
|
||||
|
||||
Reference in New Issue
Block a user