Skip to content

Commit

Permalink
test: Copy Canvas style
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Amiard committed Dec 2, 2024
1 parent fd9e51a commit d0b323c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ export async function runScreenshotTest(projectName, runtimeBaseName, runtimeOpt
export function resetCanvas(oldCanvas) {
const canvas = document.createElement('canvas');
canvas.id = 'canvas';
canvas.width = oldCanvas.width;
canvas.height = oldCanvas.height;
canvas.style.cssText = oldCanvas.style.cssText;
oldCanvas.parentNode.insertBefore(canvas, oldCanvas.nextSibling);
oldCanvas.parentNode.removeChild(oldCanvas);
return canvas;
Expand Down

0 comments on commit d0b323c

Please sign in to comment.