node: avoid test timeout if `cowsay` isn’t cached (#70961)
node: avoid test timeout if `cowsay` isn’t cached (#70961)

Before this commit, running `brew test node` could result in the test
hanging for a bit, eventually printing the following:

```sh-session
$ brew test node
==> Testing node
==> /opt/homebrew/Cellar/node/15.8.0/bin/node /private/tmp/node-test-20210210-85955-b80upx/test.js
==> /opt/homebrew/Cellar/node/15.8.0/bin/node -e 'console.log(new Intl.NumberFormat("en-EN").format(1234.56))'
==> /opt/homebrew/Cellar/node/15.8.0/bin/node -e 'console.log(new Intl.NumberFormat("de-DE").format(1234.56))'
==> /opt/homebrew/bin/npm -ddd --cache=/Users/jtilles/Library/Caches/Homebrew/npm_cache --build-from-source install npm@latest
==> /opt/homebrew/bin/npm -ddd --cache=/Users/jtilles/Library/Caches/Homebrew/npm_cache --build-from-source install bufferutil
==> /opt/homebrew/bin/npx cowsay hello
Killing child processes...
Error: node: failed
An exception occurred within a child process:
  Timeout::Error: execution expired
/opt/homebrew/Library/Homebrew/formula_assertions.rb:18:in ``'
/opt/homebrew/Library/Homebrew/formula_assertions.rb:18:in `shell_output'
/opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/node.rb:114:in `block in <class:Node>'
/opt/homebrew/Library/Homebrew/formula.rb:1915:in `block (3 levels) in run_test'
/opt/homebrew/Library/Homebrew/utils.rb:549:in `with_env'
/opt/homebrew/Library/Homebrew/formula.rb:1914:in `block (2 levels) in run_test'
/opt/homebrew/Library/Homebrew/formula.rb:900:in `with_logging'
/opt/homebrew/Library/Homebrew/formula.rb:1913:in `block in run_test'
/opt/homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'
/opt/homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'
/opt/homebrew/Library/Homebrew/mktemp.rb:63:in `run'
/opt/homebrew/Library/Homebrew/formula.rb:2161:in `mktemp'
/opt/homebrew/Library/Homebrew/formula.rb:1907:in `run_test'
/opt/homebrew/Library/Homebrew/test.rb:43:in `block in <main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
/opt/homebrew/Library/Homebrew/test.rb:42:in `<main>'
```

That behavior relates to npm 7:

> `npx` has been completely rewritten to use the `npm exec` command. There are
> various changes in functionality, most noticeable being a prompt if the module you
> are trying to run is not yet installed.

Source: <https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/#user-content-breaking-changes>
mbcoguno/homebrew-core,Moisan/homebrew-core,dsXLII/homebrew-core,Homebrew/homebrew-core,cblecker/homebrew-core,adam-moss/homebrew-core,dsXLII/homebrew-core,lemzwerg/homebrew-core,filcab/homebrew-core,chrisfinazzo/homebrew-core,uyjulian/homebrew-core,spaam/homebrew-core,Linuxbrew/homebrew-core,stgraber/homebrew-core,nandub/homebrew-core,stgraber/homebrew-core,mbcoguno/homebrew-core,JCount/homebrew-core,zyedidia/homebrew-core,mfikes/homebrew-core,adam-moss/homebrew-core,makigumo/homebrew-core,mbcoguno/homebrew-core,mfikes/homebrew-core,Linuxbrew/homebrew-core,JCount/homebrew-core,nbari/homebrew-core,chrisfinazzo/homebrew-core,makigumo/homebrew-core,lemzwerg/homebrew-core,Moisan/homebrew-core,nbari/homebrew-core,sjackman/homebrew-core,filcab/homebrew-core,sjackman/homebrew-core,Homebrew/homebrew-core,cblecker/homebrew-core,uyjulian/homebrew-core,spaam/homebrew-core,zyedidia/homebrew-core,nandub/homebrew-core