Skip to content

Commit bf73f08

Browse files
committed
unit test for utils.bind()
1 parent 91ba244 commit bf73f08

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/unit/specs/utils.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,19 @@ describe('UNIT: Utils', function () {
143143

144144
})
145145

146+
147+
describe('bind', function () {
148+
149+
it('should bind the right context', function () {
150+
function test () {
151+
return this + 1
152+
}
153+
var bound = utils.bind(test, 2)
154+
assert.strictEqual(bound(), 3)
155+
})
156+
157+
})
158+
146159
describe('toFragment', function () {
147160

148161
it('should convert a string tempalte to a documentFragment', function () {

0 commit comments

Comments
 (0)