summaryrefslogtreecommitdiff
path: root/packages/webapi/test/imagedata.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/webapi/test/imagedata.js')
-rw-r--r--packages/webapi/test/imagedata.js54
1 files changed, 0 insertions, 54 deletions
diff --git a/packages/webapi/test/imagedata.js b/packages/webapi/test/imagedata.js
deleted file mode 100644
index b386a18d6..000000000
--- a/packages/webapi/test/imagedata.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import { expect } from 'chai'
-import { polyfill } from '../mod.js'
-
-describe('ImageData', () => {
- const target = {}
-
- before(() => polyfill(target))
-
- it('Supports ImageData', () => {
- expect(target).to.have.property('ImageData').that.is.a('function')
- })
-
- it('Supports new (data: Uint8ClampedArray, width: number, height: number): ImageData', () => {
- const w = 640
- const h = 480
- const d = new Uint8ClampedArray(w * h * 4)
-
- const id = new target.ImageData(d, w, h)
-
- expect(id.data).to.equal(d)
- expect(id.width).to.equal(w)
- expect(id.height).to.equal(h)
- })
-
- it('Supports new (data: Uint8ClampedArray, width: number): ImageData', () => {
- const w = 640
- const h = 480
- const d = new Uint8ClampedArray(w * h * 4)
-
- const id = new target.ImageData(d, w)
-
- expect(id.data).to.equal(d)
- expect(id.width).to.equal(w)
- expect(id.height).to.equal(h)
- })
-
- it('Supports new (width: number, height: number): ImageData', () => {
- const w = 640
- const h = 480
-
- const id = new target.ImageData(w, h)
-
- expect(id.data).to.have.lengthOf(w * h * 4)
- expect(id.width).to.equal(w)
- expect(id.height).to.equal(h)
- })
-
- it('Supports Object.keys(new ImageData(640, 480))', () => {
- const keys = Object.keys(new target.ImageData(640, 480))
-
- expect(keys).to.have.lengthOf(1)
- expect(keys[0]).to.equal('data')
- })
-})