Skip to content

Commit

Permalink
Merge pull request #49 from synyx/bump-prettier-et-al
Browse files Browse the repository at this point in the history
Bump prettier-related dependencies
  • Loading branch information
fheft authored Sep 8, 2021
2 parents 71faac3 + 38aae05 commit 2fcd2b3
Show file tree
Hide file tree
Showing 5 changed files with 14,880 additions and 682 deletions.
36 changes: 16 additions & 20 deletions js/camera.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,18 @@ describe("camera", () => {
expect(db.camera.scale).toBe(0.5);
});
it("zooms in with anchor", () => {
let db = zoomIn({ camera: { position: [10, 20, 0], scale: 1 } }, [
40,
80,
0,
]);
let db = zoomIn(
{ camera: { position: [10, 20, 0], scale: 1 } },
[40, 80, 0],
);
expect(db.camera.position).toEqualVec3([25, 50, 0]);
expect(db.camera.scale).toBe(0.5);
});
it("zooms in with anchor at current position", () => {
let db = zoomIn({ camera: { position: [10, 20, 0], scale: 1 } }, [
10,
20,
0,
]);
let db = zoomIn(
{ camera: { position: [10, 20, 0], scale: 1 } },
[10, 20, 0],
);
expect(db.camera.position).toEqualVec3([10, 20, 0]);
expect(db.camera.scale).toBe(0.5);
});
Expand All @@ -134,20 +132,18 @@ describe("camera", () => {
expect(db.camera.scale).toBe(2);
});
it("zooms out with anchor", () => {
let db = zoomOut({ camera: { position: [10, 20, 0], scale: 1 } }, [
40,
80,
0,
]);
let db = zoomOut(
{ camera: { position: [10, 20, 0], scale: 1 } },
[40, 80, 0],
);
expect(db.camera.position).toEqualVec3([-20, -40, 0]);
expect(db.camera.scale).toBe(2);
});
it("zooms out with anchor at current position", () => {
let db = zoomOut({ camera: { position: [10, 20, 0], scale: 1 } }, [
10,
20,
0,
]);
let db = zoomOut(
{ camera: { position: [10, 20, 0], scale: 1 } },
[10, 20, 0],
);
expect(db.camera.position).toEqualVec3([10, 20, 0]);
expect(db.camera.scale).toBe(2);
});
Expand Down
3 changes: 3 additions & 0 deletions js/editor/upload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ describe("determineImageDimensions", () => {
it("rejects on unknown width or height", () => {
expect.assertions(1);
return determineImageDimensions(pngFile).catch(reason =>
// eslint-disable-next-line jest/no-conditional-expect
expect(reason).toBe("undefined width or height"),
);
});
Expand All @@ -89,12 +90,14 @@ describe("determineImageDimensions", () => {
it("rejects on invalid svg viewbox", () => {
expect.assertions(1);
return determineImageDimensions(svgFile3).catch(reason =>
// eslint-disable-next-line jest/no-conditional-expect
expect(reason).toBe("undefined width or height"),
);
});
it("rejects on invalid svg", () => {
expect.assertions(1);
return determineImageDimensions(xmlFile).catch(reason =>
// eslint-disable-next-line jest/no-conditional-expect
expect(reason).toContain("failed to get svg from document:"),
);
});
Expand Down
10 changes: 4 additions & 6 deletions js/viewport.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ describe("viewport", () => {
);
});
it("sets rect", () => {
let db = setViewportRect({ viewport: { rect: [0, 0, 0, 0] } }, [
10,
20,
30,
40,
]);
let db = setViewportRect(
{ viewport: { rect: [0, 0, 0, 0] } },
[10, 20, 30, 40],
);
expect(db.viewport.rect).toEqual([10, 20, 30, 40]);
});
it("renders viewport with a default style", () => {
Expand Down
Loading

0 comments on commit 2fcd2b3

Please sign in to comment.