Skip to content

Commit

Permalink
Setup desktop tests with jest + testing-library
Browse files Browse the repository at this point in the history
  • Loading branch information
ambarvm committed Dec 18, 2021
1 parent a4c4823 commit 54c46d4
Show file tree
Hide file tree
Showing 6 changed files with 3,033 additions and 161 deletions.
6 changes: 6 additions & 0 deletions packages/desktop/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-env",
["@babel/preset-react", { "runtime": "automatic" }]
]
}
9 changes: 9 additions & 0 deletions packages/desktop/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/

/** @type {import('@jest/types').Config.InitialOptions} */
export default {
testEnvironment: 'jsdom',
};
7 changes: 7 additions & 0 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "concurrently pnpm:dev:vite pnpm:dev:electron",
"dev:vite": "vite",
"dev:electron": "node build.js && electron .",
"test": "jest",
"build": "pnpm build:vite && pnpm build:electron",
"build:vite": "vite build",
"build:electron": "node build.js --prod",
Expand All @@ -18,15 +19,20 @@
"active-win": "^7.6.1"
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-react": "^7.16.5",
"@emotion/react": "^11.7.0",
"@emotion/styled": "^11.6.0",
"@mui/icons-material": "^5.2.1",
"@mui/material": "^5.2.3",
"@mui/styles": "^5.2.3",
"@testing-library/react": "^12.1.2",
"@vitejs/plugin-react": "^1.1.1",
"apexcharts": "^3.32.0",
"auto-launch": "^5.0.5",
"axios": "^0.24.0",
"babel-jest": "^27.4.5",
"concurrently": "^6.3.0",
"electron": "^16.0.4",
"electron-builder": "^22.10.5",
Expand All @@ -35,6 +41,7 @@
"esbuild": "^0.14.2",
"express": "^4.17.1",
"file-icon-extractor": "^1.0.4",
"jest": "^27.4.5",
"node-machine-id": "^1.1.12",
"react": "^17.0.2",
"react-apexcharts": "^1.3.9",
Expand Down
Loading

0 comments on commit 54c46d4

Please sign in to comment.