To run the tests, simply run grunt test. A script called dist.sh is also provided. It runs npm install, runs the tests, then runs npm prune --production to remove all sources, headers, and build dependencies. After that, it copies relevant files to dist/ and creates a tarball from them. This is followed by running npm install again to restore the development environment.
The dist.sh script accepts the optional command line argument --testonly. This will cause the script to exit after having run the tests.
A crude way of estimating which functions still need to be tested is this: