Test for the fix of issue 308.
Add test for the npm/ node version selection logic.
Fixed test.