Skip to content

Commit 001fe7f

Browse files
committed
Test functions via instanceOf method.
1 parent f088760 commit 001fe7f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
it('Return an object with onload and onerror methods', function () {
9292
var img = loadImage(blobGIF, function () {})
9393
expect(img).to.be.an.instanceOf(Object)
94-
expect(img.onload).to.be.a('function')
95-
expect(img.onerror).to.be.a('function')
94+
expect(img.onload).to.be.an.instanceOf(Function)
95+
expect(img.onerror).to.be.an.instanceOf(Function)
9696
})
9797

9898
it('Load image url', function (done) {
@@ -984,7 +984,7 @@
984984
loadImage(
985985
blobGIF,
986986
function (img) {
987-
expect(img.getContext).to.be.ok
987+
expect(img.getContext).to.be.an.instanceOf(Function)
988988
expect(img.nodeName.toLowerCase()).to.equal('canvas')
989989
done()
990990
},
@@ -998,7 +998,7 @@
998998
loadImage(
999999
blobGIF,
10001000
function (img) {
1001-
expect(img.getContext).to.be.ok
1001+
expect(img.getContext).to.be.an.instanceOf(Function)
10021002
expect(img.nodeName.toLowerCase()).to.equal('canvas')
10031003
expect(img.width).to.equal(30)
10041004
expect(img.height).to.equal(20)
@@ -1018,7 +1018,7 @@
10181018
img = loadImage.scale(img, {
10191019
maxWidth: 30
10201020
})
1021-
expect(img.getContext).to.be.ok
1021+
expect(img.getContext).to.be.an.instanceOf(Function)
10221022
expect(img.nodeName.toLowerCase()).to.equal('canvas')
10231023
expect(img.width).to.equal(30)
10241024
expect(img.height).to.equal(20)

0 commit comments

Comments
 (0)