UNPKG

mz-canvas

Version:

The TypeScript-based library for manipulating <canvas> element and 2D graphics in the browser.

23 lines (18 loc) 501 B
describe('Primitive Shapes', () => { describe('rect()', () => { it("Basic rect doesn't fail", () => { const { ctx, $canvas } = mzCanvas.canvas({ width: 300, height: 300, }); mzCanvas.rect({ x: 10, y: 10, w: 20, h: 30, }, ctx); // console.log($canvas.toDataURL()) expect($canvas).toBeTruthy(); }); }); });