Skip to content

Commit

Permalink
feat: πŸš€ added unit testing capabilities (xun082#26)
Browse files Browse the repository at this point in the history
* feat: πŸš€ added unit testing capabilities

* feat: πŸš€ added unit testing capabilities

* feat: πŸš€ added unit testing capabilities
  • Loading branch information
xun082 authored Jul 4, 2024
1 parent aaa7479 commit 9ed5be9
Show file tree
Hide file tree
Showing 9 changed files with 2,383 additions and 81 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,31 @@ jobs:
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: pnpm-store-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ matrix.node-version }}-
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-modules-${{ matrix.node-version }}-
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: ^9.4.0
version: ^8.9.0

- name: Install Deps
run: pnpm i --no-frozen-lockfile
Expand Down
1 change: 0 additions & 1 deletion eslint.config.js β†’ eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = [
'jsx-a11y': jsxA11y,
import: importPlugin,
prettier,
tailwindcss: tailwindcssPlugin,
},
rules: {
...typescriptEslintPlugin.configs.recommended.rules,
Expand Down
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "online-editor",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand All @@ -11,7 +12,8 @@
"lint": "eslint \"src/**/*.{js,ts,jsx,tsx}\" --fix",
"lint:ci": "eslint \"src/**/*.{js,ts,jsx,tsx}\"",
"format": "prettier --write .",
"format:ci": "prettier --list-different \"**/*.{ts,tsx,js,jsx}\""
"format:ci": "prettier --list-different \"**/*.{ts,tsx,js,jsx}\"",
"test": "vitest"
},
"keywords": [],
"author": "Moment",
Expand All @@ -31,20 +33,26 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^20.14.9",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.6.0",
"eslint-config-next": "14.2.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-tailwindcss": "^3.17.4",
"jsdom": "^24.1.0",
"postcss": "^8.4.39",
"prettier": "^3.3.2",
"tailwindcss": "^3.4.4",
"typescript": "^4.9.5"
"typescript": "^4.9.5",
"vitest": "^1.6.0"
},
"lint-staged": {
"*.{js,ts,jsx,tsx}": [
Expand Down
Loading

0 comments on commit 9ed5be9

Please sign in to comment.