From 1a5d406c35b06c3879aa9343d6ee469db7a72c2d Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Wed, 10 Jan 2024 16:54:02 -0800 Subject: [PATCH] fix tests --- .github/workflows/test.yml | 17 ++++++++++ package.json | 5 +-- src/components/DoubleRangeSlider.svelte | 1 + src/components/Tooltip.svelte | 1 + .../VerticalDoubleRangeSlider.svelte | 1 + src/content-modules/Background.svelte | 5 +-- .../SwatchTooltipContent.svelte | 5 +-- src/lib/Color.ts | 12 +++---- src/lib/ColorLint.test.ts | 21 +++--------- src/lib/__snapshots__/ColorLint.test.ts.snap | 32 +++++++------------ src/lib/lints/ColorLint.ts | 10 ++---- src/lib/lints/background-differentiability.ts | 3 +- 12 files changed, 51 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..e32a25e7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Test +on: [push] +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2.3.1 + + - name: Install and test + run: | + yarn + + - name: Test + run: | + yarn test + npm run check diff --git a/package.json b/package.json index a9449eda..527c9e59 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "check": "svelte-check --tsconfig ./tsconfig.json", "types": "tsc --noEmit --watch", "prep-data": "cp node_modules/vega-datasets/data/* public/data/", - "test": "vitest" + "test": "vitest run", + "test:watch": "vitest" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.0", @@ -49,4 +50,4 @@ "vega-embed": "^6.23.0", "vega-lite": "^5.16.3" } -} +} \ No newline at end of file diff --git a/src/components/DoubleRangeSlider.svelte b/src/components/DoubleRangeSlider.svelte index 0cc8341c..a043c723 100644 --- a/src/components/DoubleRangeSlider.svelte +++ b/src/components/DoubleRangeSlider.svelte @@ -1,4 +1,5 @@