MCPcopy Index your code
hub / github.com/gpujs/gpu.js / testCanvasIssue

Function testCanvasIssue

test/issues/471-canvas-issue.js:6–19  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

4describe('issue #471 - canvas issue');
5
6function testCanvasIssue(mode) {
7 const gpu = new GPU({mode});
8 const render = gpu
9 .createKernel(function () {
10 this.color(0, 0, 0, 1);
11 })
12 .setOutput([200, 200])
13 .setGraphical(true);
14
15 render();
16
17 assert.equal(render.canvas.constructor.name, 'HTMLCanvasElement');
18 gpu.destroy();
19}
20
21(GPU.isCanvasSupported ? test : skip)('auto', () => {
22 testCanvasIssue();

Callers 1

Calls 5

createKernelMethod · 0.95
destroyMethod · 0.95
setGraphicalMethod · 0.80
colorMethod · 0.65
setOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…