Skip to content

Commit

Permalink
build: fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobruni committed Apr 29, 2024
1 parent 5c01e60 commit 6e010fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions utils/tests/src/Fixture/CustomCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ import { createCanvas } from "canvas";

export function createCustomCanvas(width: number, height: number) {
const canvas = createCanvas(width, height);

canvas.width = 100;
canvas.height = 100;

const augmentCanvas = canvas as any;

augmentCanvas.tagName = "CANVAS";
augmentCanvas.style = {
setProperty(property: string, value: string | null, priority?: string) {
this[property] = priority ? `${value} !important` : value;
},
};
augmentCanvas.dataset = {};

return canvas;
}
2 changes: 1 addition & 1 deletion utils/tests/src/Particle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe("Particle", async () => {
expect(particle?.shape).to.equal("square");
});

it("should choose a single shape from the specified array when container Particles options specifies an array os shape types", async () => {
it("should choose a single shape from the specified array when container Particles options specifies an array of shape types", async () => {
await container.reset();
container.options.load(multipleShapeTypeOptions);
await container.refresh();
Expand Down

0 comments on commit 6e010fd

Please sign in to comment.