Fixed test-npm for node.
Fixed window.setTimeout for node.