Need Help with Running Local tests

I need help with running tests on my computer. recently I was making changes to the project p5.js. when i read the contibuters guideline page there there were mentioned some tests which can be run through npm test or npm run lint and grunt.
when i ran or the output was

> p5@1.5.0 test
> grunt

'grunt' is not recognized as an internal or external command,
operable program or batch file.

You probably need to install grunt globally. I believe the command to do this would be:

npm install -g grunt-cli

installed grunt through the command suggested. but new error arise:

grunt-cli: The grunt command line interface (v1.4.3)

Fatal error: Unable to find local grunt.

If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:

how can i solve this issue ?
other than that what are some commands through which i can run part and full test in the p5.js project