Skip to content

Commit

Permalink
implements sidebar + unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agnlez committed Feb 19, 2025
1 parent ba6fe1c commit a4674fa
Show file tree
Hide file tree
Showing 21 changed files with 2,007 additions and 68 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/client_ci_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Client Unit Tests
on:
push:
paths:
- '.github/workflows/client_ci_unit_tests.yml'
- 'package.json'
- 'client/**'
workflow_dispatch:
defaults:
run:
working-directory: client
jobs:
client-unit-tests:
name: Client Unit Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Node setup
uses: actions/setup-node@v4
with:
node-version-file: 'client/.nvmrc'

- uses: pnpm/action-setup@v4
with:
package_json_file: 'client/package.json'

- name: Install dependencies
run: pnpm install

- name: Run unit tests
run: pnpm vitest
6 changes: 6 additions & 0 deletions client/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ module.exports = {
exceptions: [''],
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
'import/no-named-as-default': 0,
'import/extensions': [
'error',
Expand Down
1 change: 1 addition & 0 deletions client/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-prefix=''
1 change: 0 additions & 1 deletion client/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from 'cypress';

export default defineConfig({
Expand Down
13 changes: 11 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"lint": "eslint -c .eslintrc.js --ext .js,.jsx,.ts,.tsx --fix --ignore-path .eslintignore .",
"test": "start-server-and-test 'pnpm dev' 3000 'pnpm cypress:run'",
"cypress:open": "cypress open",
"cypress:run": "cypress run"
"cypress:run": "cypress run",
"vitest": "vitest"
},
"dependencies": {
"@artsy/fresnel": "3.5.0",
Expand Down Expand Up @@ -38,6 +39,7 @@
"axios": "0.21.1",
"chroma-js": "2.4.2",
"classnames": "2.3.1",
"clsx": "2.1.1",
"d3-geo": "3.0.1",
"d3-scale": "4.0.2",
"final-form": "4.20.2",
Expand All @@ -60,17 +62,22 @@
"react-simple-maps": "3.0.0",
"react-use-cookie": "1.4.0",
"safe-json-stringify": "1.2.0",
"tailwind-merge": "3.0.1",
"tailwindcss": "3.1.7",
"use-debounce": "6.0.1",
"validate.js": "0.13.1"
},
"devDependencies": {
"@testing-library/dom": "10.4.0",
"@testing-library/jest-dom": "6.6.3",
"@testing-library/react": "16.2.0",
"@types/geojson": "7946.0.14",
"@types/gtag.js": "0.0.5",
"@types/react": "18.0.15",
"@types/react-dom": "18.0.6",
"@typescript-eslint/eslint-plugin": "5.13.0",
"@typescript-eslint/parser": "5.0.0",
"@vitejs/plugin-react": "4.3.4",
"assert": "2.0.0",
"cypress": "10.4.0",
"eslint": "8.57.0",
Expand All @@ -84,12 +91,14 @@
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-react": "7.28.0",
"eslint-plugin-react-hooks": "4.3.0",
"jsdom": "26.0.0",
"prettier": "2.3.0",
"start-server-and-test": "1.12.1",
"svg-sprite-loader": "6.0.11",
"svgo": "1.3.2",
"svgo-loader": "2.2.2",
"typescript": "4.5.2"
"typescript": "4.5.2",
"vitest": "3.0.6"
},
"packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
}
Loading

0 comments on commit a4674fa

Please sign in to comment.