etherspot / skandha

A modular typescript implementation of ERC4337 (Account Abstraction) bundler client.
https://etherspot.io
MIT License
560 stars 50 forks source link

feat: set up env for test & add basic unit test example #129

Closed 0xSulpiride closed 7 months ago

0xSulpiride commented 9 months ago

Description

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Further comments (optional)

-

0xSulpiride commented 8 months ago

Apparently viem library does not carry it's own evm for tests, it makes use of anvil or hardhat. We can use that with ethers.js as well, so I went on using Ethers in tests. To run tests you must have Anvil installed: https://book.getfoundry.sh/getting-started/installation

Also added some tests for UserOpValidationService and EthModule

0xSulpiride commented 8 months ago

I'll add some more unit tests for each module and service