fix accidental global variable in test, for npm