For local dev Run npx hardhat node and then run npx hardhat run scripts/deploy.js --network localhost. To run test Run npx hardhat test