From 1246a6e25d89fde8d0f1286847d9764de499f0a1 Mon Sep 17 00:00:00 2001 From: Brian Mitchell Date: Wed, 17 Apr 2024 21:28:17 -0500 Subject: [PATCH] Upgrade to prettier 3 --- .prettierrc | 1 - package-lock.json | 159 ++++++++------------------------- package.json | 10 +-- src/app.css | 16 +++- src/app.html | 2 +- src/lib/CompareImage.svelte | 12 ++- src/tests/CompareImage.spec.ts | 8 +- src/tests/Example.spec.ts | 38 ++++---- src/tests/page.spec.ts | 8 +- 9 files changed, 92 insertions(+), 162 deletions(-) diff --git a/.prettierrc b/.prettierrc index ca43d6f..6b78363 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,4 @@ { "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/package-lock.json b/package-lock.json index 7015970..b012b75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,9 +22,9 @@ "eslint-plugin-svelte": "^2.37.0", "eslint-plugin-testing-library": "^5.11.1", "jsdom": "^24.0.0", - "prettier": "^2.8.8", - "prettier-plugin-svelte": "^2.10.1", - "pretty-quick": "^3.3.1", + "prettier": "^3.2.5", + "prettier-plugin-svelte": "^3.2.3", + "pretty-quick": "^4.0.0", "publint": "^0.1.16", "simple-git-hooks": "^2.11.1", "svelte": "^4.2.15", @@ -2431,15 +2431,6 @@ "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==", "dev": true }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -2956,19 +2947,19 @@ } }, "node_modules/execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" }, "engines": { @@ -3187,15 +3178,12 @@ } }, "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3435,12 +3423,12 @@ } }, "node_modules/human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "engines": { - "node": ">=8.12.0" + "node": ">=10.17.0" } }, "node_modules/iconv-lite": { @@ -4686,15 +4674,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4951,28 +4930,28 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-plugin-svelte": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.10.1.tgz", - "integrity": "sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.2.3.tgz", + "integrity": "sha512-wJq8RunyFlWco6U0WJV5wNCM7zpBFakS76UBSbmzMGpncpK98NZABaE+s7n8/APDCEVNHXC5Mpq+MLebQtsRlg==", "dev": true, "peerDependencies": { - "prettier": "^1.16.4 || ^2.0.0", - "svelte": "^3.2.0 || ^4.0.0-next.0" + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" } }, "node_modules/pretty-format": { @@ -5002,13 +4981,13 @@ } }, "node_modules/pretty-quick": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-3.3.1.tgz", - "integrity": "sha512-3b36UXfYQ+IXXqex6mCca89jC8u0mYLqFAN5eTQKoXO6oCQYcIVYZEB/5AlBHI7JPYygReM2Vv6Vom/Gln7fBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.0.0.tgz", + "integrity": "sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==", "dev": true, "dependencies": { - "execa": "^4.1.0", - "find-up": "^4.1.0", + "execa": "^5.1.1", + "find-up": "^5.0.0", "ignore": "^5.3.0", "mri": "^1.2.0", "picocolors": "^1.0.0", @@ -5016,65 +4995,13 @@ "tslib": "^2.6.2" }, "bin": { - "pretty-quick": "dist/cli.js" + "pretty-quick": "lib/cli.mjs" }, "engines": { - "node": ">=10.13" + "node": ">=14" }, "peerDependencies": { - "prettier": "^2.0.0" - } - }, - "node_modules/pretty-quick/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pretty-quick/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "prettier": "^3.0.0" } }, "node_modules/pretty-quick/node_modules/picomatch": { @@ -5115,16 +5042,6 @@ "url": "https://bjornlu.com/sponsor" } }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/package.json b/package.json index ec76517..c497a06 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test:unit": "vitest", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write .", + "lint": "prettier --check . && eslint .", + "format": "prettier --write .", "prettier-staged": "pretty-quick --staged" }, "exports": { @@ -61,9 +61,9 @@ "eslint-plugin-svelte": "^2.37.0", "eslint-plugin-testing-library": "^5.11.1", "jsdom": "^24.0.0", - "prettier": "^2.8.8", - "prettier-plugin-svelte": "^2.10.1", - "pretty-quick": "^3.3.1", + "prettier": "^3.2.5", + "prettier-plugin-svelte": "^3.2.3", + "pretty-quick": "^4.0.0", "publint": "^0.1.16", "simple-git-hooks": "^2.11.1", "svelte": "^4.2.15", diff --git a/src/app.css b/src/app.css index cef35b9..9c158d3 100644 --- a/src/app.css +++ b/src/app.css @@ -2,9 +2,19 @@ /* use the browser default styles for most things, including colors */ color-scheme: light dark; - font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", - Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji"; + font-family: + system-ui, + -apple-system, + "Segoe UI", + Roboto, + "Helvetica Neue", + Arial, + "Noto Sans", + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji"; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --background-color: #ffffff; diff --git a/src/app.html b/src/app.html index f074dc2..e6e34b2 100644 --- a/src/app.html +++ b/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/src/lib/CompareImage.svelte b/src/lib/CompareImage.svelte index e8a8ab5..23b1739 100644 --- a/src/lib/CompareImage.svelte +++ b/src/lib/CompareImage.svelte @@ -168,8 +168,10 @@ border: var(--handle-border-width, 0.125rem) solid var(--slider-color, #ffffff); border-radius: 100%; - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), - 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12); + box-shadow: + 0 3px 1px -2px rgba(0, 0, 0, 0.2), + 0 2px 2px 0 rgba(0, 0, 0, 0.14), + 0 1px 5px 0 rgba(0, 0, 0, 0.12); color: var(--slider-color, #ffffff); width: var(--handle-size, 2.5rem); height: var(--handle-size, 2.5rem); @@ -191,8 +193,10 @@ border: var(--handle-border-width, 0.125rem) solid var(--slider-color, #ffffff); border-radius: 100%; - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), - 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12); + box-shadow: + 0 3px 1px -2px rgba(0, 0, 0, 0.2), + 0 2px 2px 0 rgba(0, 0, 0, 0.14), + 0 1px 5px 0 rgba(0, 0, 0, 0.12); color: var(--slider-color, #ffffff); width: var(--handle-size, 2.5rem); height: var(--handle-size, 2.5rem); diff --git a/src/tests/CompareImage.spec.ts b/src/tests/CompareImage.spec.ts index 4d75e66..9e51e08 100644 --- a/src/tests/CompareImage.spec.ts +++ b/src/tests/CompareImage.spec.ts @@ -17,7 +17,7 @@ const yellow6x10 = // eslint-disable-next-line @typescript-eslint/no-explicit-any function renderHelper( component: ComponentType = CompareImage, - props?: Record + props?: Record, ) { const view = render(component, { imageLeftSrc: orange, @@ -111,7 +111,7 @@ describe("CompareImage", () => { expect(screen.getByRole("slider")).toHaveValue("50"); expect(screen.getByTestId("svelte-compare-image")).toHaveStyle( - "--slider-position: 50%" + "--slider-position: 50%", ); await fireEvent.change(screen.getByRole("slider"), { @@ -125,7 +125,7 @@ describe("CompareImage", () => { }); expect(screen.getByTestId("svelte-compare-image")).toHaveStyle( - "--slider-position: 20%" + "--slider-position: 20%", ); }); @@ -133,7 +133,7 @@ describe("CompareImage", () => { renderHelper(); expect(screen.getByRole("slider")).toHaveAccessibleName( - "Set the visibility of one image over the other. 0 is full visibility of the second image and 100 is full visibility of the first image. Any amount in-between is a left/right cutoff at the percentage of the slider." + "Set the visibility of one image over the other. 0 is full visibility of the second image and 100 is full visibility of the first image. Any amount in-between is a left/right cutoff at the percentage of the slider.", ); }); diff --git a/src/tests/Example.spec.ts b/src/tests/Example.spec.ts index 3b76501..d90acb9 100644 --- a/src/tests/Example.spec.ts +++ b/src/tests/Example.spec.ts @@ -10,7 +10,7 @@ import Example from "../components/Example.svelte"; function getRangeInput(image: "Left" | "Right", dimension: "Width" | "Height") { return within( - screen.getByRole("group", { name: `${image} Image Size` }) + screen.getByRole("group", { name: `${image} Image Size` }), ).getByLabelText(dimension); } @@ -28,12 +28,12 @@ describe("Example", () => { expect(getRangeInput("Left", "Width")).toHaveValue("600"); expect(getRangeInput("Left", "Height")).toHaveValue("400"); expect( - screen.getByRole("group", { name: "Left Image Size" }) + screen.getByRole("group", { name: "Left Image Size" }), ).toHaveAccessibleDescription("Dimensions are 600px x 400px"); expect(getRangeInput("Right", "Width")).toHaveValue("600"); expect(getRangeInput("Right", "Height")).toHaveValue("400"); expect( - screen.getByRole("group", { name: "Right Image Size" }) + screen.getByRole("group", { name: "Right Image Size" }), ).toHaveAccessibleDescription("Dimensions are 600px x 400px"); }); @@ -41,7 +41,7 @@ describe("Example", () => { expect(getRangeInput("Left", "Width")).toHaveValue("600"); expect(getRangeInput("Left", "Height")).toHaveValue("400"); expect( - screen.getByRole("group", { name: "Left Image Size" }) + screen.getByRole("group", { name: "Left Image Size" }), ).toHaveAccessibleDescription("Dimensions are 600px x 400px"); await fireEvent.input(getRangeInput("Left", "Width"), { @@ -59,7 +59,7 @@ describe("Example", () => { }); expect( - screen.getByRole("group", { name: "Left Image Size" }) + screen.getByRole("group", { name: "Left Image Size" }), ).toHaveAccessibleDescription("Dimensions are 450px x 200px"); }); @@ -67,7 +67,7 @@ describe("Example", () => { expect(getRangeInput("Right", "Width")).toHaveValue("600"); expect(getRangeInput("Right", "Height")).toHaveValue("400"); expect( - screen.getByRole("group", { name: "Right Image Size" }) + screen.getByRole("group", { name: "Right Image Size" }), ).toHaveAccessibleDescription("Dimensions are 600px x 400px"); await fireEvent.input(getRangeInput("Right", "Width"), { @@ -85,14 +85,14 @@ describe("Example", () => { }); expect( - screen.getByRole("group", { name: "Right Image Size" }) + screen.getByRole("group", { name: "Right Image Size" }), ).toHaveAccessibleDescription("Dimensions are 450px x 200px"); }); it("changes the handle size", async () => { expect(screen.getByLabelText("Handle Size")).toHaveValue("2.5"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--handle-size="2\.5rem"/ + /--handle-size="2\.5rem"/, ); await fireEvent.input(screen.getByLabelText("Handle Size"), { @@ -101,16 +101,16 @@ describe("Example", () => { expect(screen.getByLabelText("Handle Size")).toHaveValue("1.25"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--handle-size="1\.25rem"/ + /--handle-size="1\.25rem"/, ); }); it("changes the handle background color", async () => { expect(screen.getByLabelText("Handle Background Color")).toHaveValue( - "#000000" + "#000000", ); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--handle-background-color="rgba\(0, 0, 0, 0\.6\)"/ + /--handle-background-color="rgba\(0, 0, 0, 0\.6\)"/, ); await fireEvent.input(screen.getByLabelText("Handle Background Color"), { @@ -118,17 +118,17 @@ describe("Example", () => { }); expect(screen.getByLabelText("Handle Background Color")).toHaveValue( - "#bada55" + "#bada55", ); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--handle-background-color="#bada55"/ + /--handle-background-color="#bada55"/, ); }); it("changes the handle border width", async () => { expect(screen.getByLabelText("Handle Border Width")).toHaveValue("0.125"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--handle-border-width="0\.125rem"/ + /--handle-border-width="0\.125rem"/, ); await fireEvent.input(screen.getByLabelText("Handle Border Width"), { @@ -137,14 +137,14 @@ describe("Example", () => { expect(screen.getByLabelText("Handle Border Width")).toHaveValue("0.75"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--handle-border-width="0\.75rem"/ + /--handle-border-width="0\.75rem"/, ); }); it("changes the slider color", async () => { expect(screen.getByLabelText("Slider Color")).toHaveValue("#ffffff"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--slider-color="#ffffff"/ + /--slider-color="#ffffff"/, ); await fireEvent.input(screen.getByLabelText("Slider Color"), { @@ -153,14 +153,14 @@ describe("Example", () => { expect(screen.getByLabelText("Slider Color")).toHaveValue("#bada55"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--slider-color="#bada55"/ + /--slider-color="#bada55"/, ); }); it("changes the slider width", async () => { expect(screen.getByLabelText("Slider Width")).toHaveValue("0.125"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--slider-width="0\.125rem"/ + /--slider-width="0\.125rem"/, ); await fireEvent.input(screen.getByLabelText("Slider Width"), { @@ -169,7 +169,7 @@ describe("Example", () => { expect(screen.getByLabelText("Slider Width")).toHaveValue("0.25"); expect(screen.getByLabelText("Code Snippet")).toHaveTextContent( - /--slider-width="0\.25rem"/ + /--slider-width="0\.25rem"/, ); }); }); diff --git a/src/tests/page.spec.ts b/src/tests/page.spec.ts index 6909536..6f29dc1 100644 --- a/src/tests/page.spec.ts +++ b/src/tests/page.spec.ts @@ -9,20 +9,20 @@ describe("index page", () => { describe("once the component has been rendered", () => { it("renders the proper heading", () => { expect( - screen.getByRole("heading", { name: "Svelte Compare Image" }) + screen.getByRole("heading", { name: "Svelte Compare Image" }), ).toBeInTheDocument(); }); it("renders the correct links", () => { expect(screen.getByRole("link", { name: "GitHub" })).toHaveAttribute( "href", - "https://github.com/BrianMitchL/svelte-compare-image" + "https://github.com/BrianMitchL/svelte-compare-image", ); expect( - screen.getByRole("link", { name: "svelte-compare-image" }) + screen.getByRole("link", { name: "svelte-compare-image" }), ).toHaveAttribute( "href", - "https://npmjs.com/package/svelte-compare-image" + "https://npmjs.com/package/svelte-compare-image", ); }); });