diff options
author | 2023-08-24 10:38:14 -0400 | |
---|---|---|
committer | 2023-08-24 10:38:14 -0400 | |
commit | f1c610636a7aeed0a272ab2669815135699b413c (patch) | |
tree | d7597c3468197559948f9fe2bafe13a8c3d71106 /packages/webapi/test/imagedata.js | |
parent | 608b2d732d762bf1f7f44a82b278caa8853c8c2f (diff) | |
parent | ebaccf8c1a2f37eacb6e1957c82fdf7f93b62b08 (diff) | |
download | astro-f1c610636a7aeed0a272ab2669815135699b413c.tar.gz astro-f1c610636a7aeed0a272ab2669815135699b413c.tar.zst astro-f1c610636a7aeed0a272ab2669815135699b413c.zip |
Merge pull request #8188 from withastro/next
Astro 3.0
Diffstat (limited to 'packages/webapi/test/imagedata.js')
-rw-r--r-- | packages/webapi/test/imagedata.js | 54 |
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') - }) -}) |