Skip to content

Commit

Permalink
update testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
popomore committed May 9, 2013
1 parent 6843c77 commit e82f435
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/widget-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,15 +579,17 @@ define(function(require) {
expect(nullSpy.calledOnce).not.to.be.ok()
expect(undefinedSpy.calledOnce).not.to.be.ok()
expect(functionSpy.calledOnce).to.be.ok()
boolSpy.reset()
str2Spy.reset()

// 测试 onXxx
var b = globalVar.b = new A({
bool: null,
str2: ''
}).render()

expect(boolSpy.calledOnce).to.be.ok()
expect(str2Spy.calledTwice).to.be.ok()
expect(boolSpy.called).not.to.be.ok()
expect(str2Spy.calledOnce).to.be.ok()
})

it('call render() after first render', function() {
Expand Down

0 comments on commit e82f435

Please sign in to comment.