I’m new to Fuel and I wrote my first smart contract. It built just fine, but the two test cases took ages (>15 mins) to pass successfully. I’m attaching the repository link. I’m hoping either I’m doing something wrong or this is some known issue being fixed. I was wondering if there’s another way to run unit tests.
Hey @Nambi, happy holidays! I just tested your repository. During the first run of cargo test, you have to download all dependencies. The compiling time is likely dependent on your hardware and internet speeds. Subsequent cargo test runs should be much faster, provided you don’t change your dependency versions, like upgrading fuels-rs.
You can also write your unit tests in Sway directly within your code. Check out this section of our guides for more information: Sway Testing Guide.