Skip to content

Commit a01837e

Browse files
committed
fix: 🐛 setup and linting
1 parent 8940350 commit a01837e

21 files changed

Lines changed: 595 additions & 52 deletions

.eslintignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ node_modules
33
storybook-static
44
.storybook
55
coverage
6-
rollup.config.js
6+
rollup.config.js
7+
jest.config.ts
8+
jest.setup.ts
9+
next-env.d.ts
10+
commitlint.config.js
11+
next.config.js

__tests__/examples/controls.utils.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const Controls: React.FC = () => {
1111
type="button"
1212
onClick={() => {
1313
zoomIn();
14-
console.log("zoomIn");
1514
}}
1615
data-testid="zoom-in"
1716
>
@@ -21,7 +20,6 @@ export const Controls: React.FC = () => {
2120
type="button"
2221
onClick={() => {
2322
zoomOut();
24-
console.log("zoomOut");
2523
}}
2624
data-testid="zoom-out"
2725
>
@@ -31,7 +29,6 @@ export const Controls: React.FC = () => {
3129
type="button"
3230
onClick={() => {
3331
resetTransform();
34-
console.log("resetTransform");
3532
}}
3633
data-testid="reset"
3734
>
@@ -41,7 +38,6 @@ export const Controls: React.FC = () => {
4138
type="button"
4239
onClick={() => {
4340
centerView();
44-
console.log("centerView");
4541
}}
4642
data-testid="center"
4743
>

__tests__/examples/example.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ export const Example = (options: {
5656
<div style={{ background: "#444", color: "white", padding: "50px" }}>
5757
<h1>Title</h1>
5858
<h2>Subtitle</h2>
59-
<button
59+
{/* <button
6060
type="button"
6161
onClick={() => alert("You can still interact with click events!")}
6262
>
6363
Click me!
64-
</button>
64+
</button> */}
6565
<div
6666
style={{
6767
display: "flex",

__tests__/features/controls/controls.center.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { fireEvent, waitFor } from "@testing-library/react";
22

33
import { renderApp } from "../../utils/render-app";
4-
import { sleep } from "../../utils";
54

65
describe("Controls [Center]", () => {
76
describe("When centering with controls button", () => {
87
it("should change css transform", async () => {
9-
const { content, wrapper, centerBtn, zoom } = renderApp();
8+
const { content, centerBtn, zoom } = renderApp();
109
zoom({ value: 1.65 });
1110
expect(content.style.transform).toBe("translate(0px, 0px) scale(1.65)");
1211
fireEvent(centerBtn, new MouseEvent("click", { bubbles: true }));

__tests__/features/controls/controls.reset.spec.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { fireEvent, waitFor } from "@testing-library/react";
22

33
import { renderApp } from "../../utils/render-app";
4-
import { sleep } from "../../utils";
54

65
describe("Controls [Reset]", () => {
76
describe("When resetting state with controls button", () => {

__tests__/features/pan-track-pad/pan-track-pad.base.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { waitFor } from "@testing-library/react";
22

3-
import { renderApp, sleep } from "../../utils";
3+
import { renderApp } from "../../utils";
44

55
describe("Pan TrackPad [Base]", () => {
66
describe("When panning to coords", () => {

__tests__/features/pan/pan.bounds.spec.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import { waitFor } from "@testing-library/react";
2-
3-
import { renderApp } from "../../utils";
4-
51
describe("Pan [Bounds]", () => {
62
it("TODO", () => {
73
expect(true).toBe(true);

__tests__/features/pinch/pinch.base.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { waitFor } from "@testing-library/dom";
2+
23
import { renderApp } from "../../utils/render-app";
34

45
describe("Pinch [Base]", () => {

__tests__/features/pinch/pinch.panning.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { waitFor } from "@testing-library/dom";
2+
23
import { renderApp } from "../../utils/render-app";
34

45
describe("Pinch [Panning]", () => {

__tests__/features/zoom/zoom.base.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { waitFor } from "@testing-library/dom";
2+
23
import { renderApp } from "../../utils/render-app";
34

45
describe("Zoom [Base]", () => {

0 commit comments

Comments
 (0)