Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
Separate unit tests and integration tests with Hardhat and NPM

I am trying to setup in my package.json two commands for starting my unit tests and integration tests, but I am having difficulties in specifying a testset (location) for these two types of testing.

In my package.json in scripts section 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”
….

But hardhat test task does not seem to handle the wildcard specification well. It only executes test files which are directly within the directory integration (for integration test case). It is not (recursively) executing test files in subfolders (descendants) of the integration directory.

So, I suspect that this limitation is in the implementation of the test task of Hardhat. Does any one knows how to specify a command which executes all test files in all descendant folders of unit directory or integration directory?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!