Struggling with setting up two commands in my package.json for running unit tests and integration tests. I am having trouble defining the location of the testset for each type of testing.
Within the scripts section of my package.json, I have created two commands for unit tests and integration tests:
…
….
“unit”: “hardhat test test/unit/**/*.test.ts”,
“integration”: “hardhat test test/integration/**/*.inttest.ts”
….
Unfortunately, the hardhat test task does not handle the wildcard specification effectively. It only runs test files directly within the integration directory for integration test cases, failing to execute test files in subfolders within the descendant folders.
This limitation seems to be in the implementation of the test task in Hardhat. Does anyone know how to create a command that will run all test files in all descendant folders of either the unit or integration directories?