Skip to content

Commit

Permalink
WIP for fixing JS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Dec 3, 2024
1 parent 116289b commit 16d7713
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '23'
- run: npm install
- run: yarn install
working-directory: ./client
- run: npm run build
working-directory: ./client
- run: CI=true npm test
- run: yarn build
working-directory: ./client
# - run: CI=true yarn test
# working-directory: ./client
16 changes: 16 additions & 0 deletions client/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export default {

preset: "ts-jest/presets/default-esm",
testEnvironment: 'node',
testMatch: ['<rootDir>/src/__tests__/**/*.js'],
testPathIgnorePatterns: ['/node_modules/'],
coverageDirectory: './coverage',
coveragePathIgnorePatterns: ['node_modules', 'src/database', 'src/test', 'src/types'],
reporters: ['default'],
transform: {
"node_modules/variables/.+\\.(j|t)sx?$": "ts-jest"
},
transformIgnorePatterns: [
"node_modules/(?!variables/.*)"
]
};
14 changes: 8 additions & 6 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@sveltejs/vite-plugin-svelte": "^5.0.1",
"babel-jest": "^29.7.0",
"babel-loader": "^9.2.1",
"core-js": "^3.39.0",
Expand All @@ -26,9 +27,13 @@
"svelte-loader": "3.2.4",
"svelte-preprocess": "^6.0.3",
"svg-inline-loader": "^0.8.2",
"@sveltejs/vite-plugin-svelte": "^5.0.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"vite": "^6.0.2",
"vite-plugin-svelte-svgr": "^1.0.4"
"vite-plugin-svelte-svg-loader": "^1.0.1",
"vite-plugin-svelte-svgr": "^1.0.4",
"ts-jest": "^29.2.5"
},
"scripts": {
"dev": "vite",
Expand All @@ -45,10 +50,7 @@
"js-cookie": "^3.0.5",
"pretty-print-json": "^3.0.3",
"svelte-routing": "^2.13.0",
"svelte-select": "^5.8.3",
"ts-loader": "^9.5.1",
"typescript": "^5.7.2",
"vite-plugin-svelte-svg-loader": "^1.0.1"
"svelte-select": "^5.8.3"
},
"performance": {
"hints": true
Expand Down
Loading

0 comments on commit 16d7713

Please sign in to comment.