-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
2,855 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Run Jest Tests | ||
|
||
on: | ||
push: # Runs on all pushes | ||
pull_request: # Runs on all pull requests | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x, 20.x, 22.x] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run tests | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// jest.config.ts | ||
import type { JestConfigWithTsJest } from "ts-jest"; | ||
|
||
const jestConfig: JestConfigWithTsJest = { | ||
preset: "ts-jest", | ||
testEnvironment: "jsdom", | ||
transform: { | ||
// "^.+\\.(t|j)sx?$": ["@swc/jest"], | ||
}, | ||
moduleNameMapper: { | ||
"^@/(.*)$": "<rootDir>/$1", | ||
"\\.(css|less|sass|scss)$": "identity-obj-proxy", | ||
}, | ||
modulePaths: ["<rootDir>"], | ||
transformIgnorePatterns: ["/node_modules/(?!react18-json-view)"], | ||
testPathIgnorePatterns: ["/node_modules/", "/dist/"], | ||
}; | ||
|
||
export default jestConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
"example": "example" | ||
}, | ||
"scripts": { | ||
"test": "npx jest", | ||
"build": "tsc && rollup -c", | ||
"build:watch": "concurrently \"tsc --watch\" \"rollup -c --watch\"", | ||
"ci:version": "changeset version", | ||
|
@@ -27,27 +28,37 @@ | |
"license": "ISC", | ||
"devDependencies": { | ||
"@changesets/cli": "^2.27.7", | ||
"@jest/globals": "^29.7.0", | ||
"@rollup/plugin-commonjs": "^26.0.1", | ||
"@rollup/plugin-node-resolve": "^15.2.3", | ||
"@types/react": "npm:types-react@rc", | ||
"@types/react-dom": "npm:types-react-dom@rc", | ||
"@testing-library/jest-dom": "^6.4.8", | ||
"@types/jest": "^29.5.12", | ||
"@types/react": "npm:[email protected]", | ||
"@types/react-dom": "npm:[email protected]", | ||
"@types/uuid": "^10.0.0", | ||
"autoprefixer": "^10.4.20", | ||
"concurrently": "^8.2.2", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-react": "^7.35.0", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"postcss": "^8.4.41", | ||
"rollup": "^4.20.0", | ||
"rollup-plugin-peer-deps-external": "^2.2.4", | ||
"rollup-plugin-typescript2": "^0.36.0", | ||
"tailwindcss": "^3.4.9", | ||
"ts-jest": "^29.2.4", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.5.4" | ||
}, | ||
"dependencies": { | ||
"@ai-sdk/openai": "^0.0.44", | ||
"@testing-library/dom": "^10.4.0", | ||
"@testing-library/react": "^16.0.0", | ||
"ai": "^3.3.6", | ||
"clsx": "^2.1.1", | ||
"nanoid": "^5.0.7", | ||
"react": "19.0.0-rc-cc1ec60d0d-20240607", | ||
"react-dom": "19.0.0-rc-cc1ec60d0d-20240607", | ||
"react18-json-view": "^0.2.8", | ||
|
Oops, something went wrong.