Skip to content

Commit

Permalink
setup e2e testing
Browse files Browse the repository at this point in the history
  • Loading branch information
YasseinBilal committed May 22, 2024
1 parent bf3b9d1 commit cfc978b
Show file tree
Hide file tree
Showing 15 changed files with 11,915 additions and 3,406 deletions.
20 changes: 20 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
services:
anvil:
image: ghcr.io/foundry-rs/foundry:nightly-f6208d8db68f9acbe4ff8cd76958309efb61ea0b
ports: [ "8545:8545" ]
entrypoint: [ "anvil", "--fork-url", "https://rpc.ankr.com/eth_sepolia", "--host", "0.0.0.0", "--block-time", "0.1", "--silent"]
platform: linux/x86_64

mock-paymaster:
image: ghcr.io/pimlicolabs/mock-verifying-paymaster:main
ports: [ "3000:3000" ]
environment:
- ALTO_RPC=http://alto:4337
- ANVIL_RPC=http://anvil:8545

alto:
image: ghcr.io/pimlicolabs/mock-alto-bundler:main
ports: [ "4337:4337" ]
environment:
- ANVIL_RPC=http://anvil:8545
- SKIP_DEPLOYMENTS=true
14 changes: 14 additions & 0 deletions jest-e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"moduleFileExtensions": ["js", "json", "ts"],
"testRegex": ".e2e-test.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"collectCoverageFrom": ["**/*.(t|j)s"],
"moduleNameMapper": {
"^src/(.*)$": "<rootDir>/src/$1",
"^test/(.*)$": "<rootDir>/test/$1"
},
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./src/_types --emitDeclarationOnly --declaration --declarationMap",
"clean": "rimraf src/_esm src/_cjs src/_types",
"test": "jest",
"test:e2e": "jest --config ./jest-e2e.json",
"test:coverage": "jest --coverage",
"test:badges": "jest --coverage && jest-coverage-badges output './badges'",
"lint": "eslint",
Expand Down Expand Up @@ -41,6 +42,7 @@
"dependencies": {
"@apollo/client": "^3.10.1",
"@size-limit/esbuild-why": "^11.1.1",
"permissionless": "^0.1.29",
"tslib": "^2.6.2"
}
}
Loading

0 comments on commit cfc978b

Please sign in to comment.