Skip to content

Commit

Permalink
chore: test config | test: truncate wallet example (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti authored Jul 8, 2024
1 parent 4d58adf commit 15ef895
Show file tree
Hide file tree
Showing 7 changed files with 1,348 additions and 104 deletions.
16 changes: 16 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Config } from 'jest';
import nextJest from 'next/jest.js';

const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
dir: './',
});

// Add any custom config to be passed to Jest
const config: Config = {
coverageProvider: 'v8',
testEnvironment: 'jsdom',
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config);
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"prepare": "husky install && wonderland-crypto-husky-checks install",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"test": "pnpm cypress:run"
"test:e2e": "pnpm cypress run",
"test:unit": "jest",
"test": "pnpm run test:unit && pnpm run test:e2e"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix",
Expand All @@ -48,10 +50,13 @@
},
"devDependencies": {
"@defi-wonderland/crypto-husky-checks": "1.3.0",
"@jest/globals": "29.7.0",
"@testing-library/jest-dom": "6.1.2",
"@testing-library/react": "14.2.1",
"@testing-library/user-event": "14.4.3",
"@types/jest": "29.5.12",
"@types/lodash.merge": "4.6.7",
"@types/node": "20.12.13",
"@types/react": "18.2.15",
"@types/react-dom": "18.2.7",
"@typescript-eslint/eslint-plugin": "6.0.0",
Expand All @@ -66,10 +71,14 @@
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.3",
"husky": "8.0.3",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jsdom": "24.0.0",
"lodash.merge": "4.6.2",
"prettier": "3.0.3",
"styled-components": "6.0.7",
"ts-jest": "29.1.4",
"ts-node": "10.9.2",
"typescript": "5.4.2"
}
}
Loading

0 comments on commit 15ef895

Please sign in to comment.