Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed May 5, 2023
1 parent f8c9a22 commit 6bc8003
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Binary file modified docs/static/img/image-filters/dropshadow-only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions package/src/skia/__tests__/RichtText.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TextAlign } from "../types/Paragraph";

import { setupSkia } from "./setup";

const roboto = resolveFile("skia/__tests__/assets/Roboto-Regular.ttf");
const roboto = resolveFile("skia/__tests__/assets/Roboto-Medium.ttf");
const noto = resolveFile("skia/__tests__/assets/NotoColorEmoji.ttf");

describe("Text", () => {
Expand Down Expand Up @@ -35,7 +35,7 @@ describe("Text", () => {
paragraph.layout(width);
expect(paragraph.getHeight()).not.toBe(0);
canvas.drawParagraph(paragraph, 0, 0);
processResult(surface, "snapshots/drawings/paragraph.png");
processResult(surface, "snapshots/drawings/paragraph-2.png");
});
it("should display the paragraph layout with different text color", async () => {
const { surface, canvas, width, Skia } = setupSkia();
Expand Down Expand Up @@ -81,6 +81,6 @@ describe("Text", () => {
paragraph.layout(width);
expect(paragraph.getHeight()).not.toBe(0);
canvas.drawParagraph(paragraph, 0, 0);
processResult(surface, "snapshots/drawings/paragraph-with-colors.png");
processResult(surface, "snapshots/drawings/paragraph-with-colors-2.png");
});
});

0 comments on commit 6bc8003

Please sign in to comment.