nodists / nodist

Natural node.js and npm version manager for windows.
MIT License
1.61k stars 214 forks source link

How do I run the tests? #24

Closed fschwiet closed 11 years ago

fschwiet commented 11 years ago

I am seeing some test failures, given I can change the result be installing node v0.8.0, I do not think I am running the tests correctly. Here is sample output. First 3 tests fail. Looking at the tests, I experiment and install v0.8.0. Then, only 2 tests fail. My c:\tmp\v directory is empty, it looks like thats where test installs should go.

C:\src\nodist [master +1 ~0 -0 !]> .\node.exe .\test\cli-test.js
· ? ? ?·

    nodist list
      ? should list the installed version
        » expected expression to evaluate to true, but was false // cli-test.js:35

    nodist run
      ? should run the specified version
        » expected expression to evaluate to true, but was null // cli-test.js:44

    nodist rm
      ? should remove the specified version
        » expected expression to evaluate to true, but was false // cli-test.js:53
  ? Broken » 2 honored · 3 broken (27.894s)
  C:\src\nodist [master +1 ~0 -0 !]> .\bin\nodist.cmd
No builds installed, yet.
C:\src\nodist [master +1 ~0 -0 !]> .\bin\nodist.cmd + 0.8.0
0.8.0
C:\src\nodist [master +1 ~0 -0 !]> .\bin\nodist.cmd list
  0.8.0
C:\src\nodist [master +1 ~0 -0 !]> .\node.exe .\test\cli-test.js
· ? ? ··

    nodist list
      ? should list the installed version
        » expected expression to evaluate to true, but was false // cli-test.js:35

    nodist run
      ? should run the specified version
        » expected expression to evaluate to true, but was null // cli-test.js:44
  ? Broken » 3 honored · 2 broken (7.059s)
fschwiet commented 11 years ago

Oh, to get that far, I had also ran .\bin\npm.cmd install

I'm new enough to node.js that I do not really know if that was the right thing to do.

fschwiet commented 11 years ago

Oh, I can get it to only have one failing test if I run with "cmd /c" again. I get the same result with a cmd shell (I was using powershell before).

  C:\src\nodist [master +1 ~0 -0 !]> cmd /c ".\node.exe .\test\cli-test.js"
· · ? ··

    nodist run
      ? should run the specified version
        » expected expression to evaluate to true, but was null // cli-test.js:44
  ? Broken » 4 honored · 1 broken (5.520s)
marcelklehr commented 11 years ago

Hm. I can replicate at least one failing test... I'll do some more thorough investigations soon

marcelklehr commented 11 years ago

ok, so at least the nodist run command is broken.

marcelklehr commented 11 years ago

it's fixed now.

A recommended set up is to have your git repo and development stuff in one folder and the nodist production instance in another (usually you don't want to break your node installation just because you're working on nodist).

Furthermore I recommend you to uninstall any node.js installations prior to installing nodist and to follow this guide closely. In your development instance folder you should run npm install to install the dev dependencies (namely vows). To run the tests you just run vows (you need to install it globally too in order for the command to be available).

marcelklehr commented 11 years ago

After another tiny fix all test pass for me now... let me now if you still experience problems.

fschwiet commented 11 years ago

Looks good

C:\src\nodist [master +1 ~0 -0 !]> .\node.exe .\test\cli-test.js · · · ·· √ OK » 5 honored (8.932s)

fschwiet commented 11 years ago

I overlooked your explanation at first, so now I'll run it properly. Still good.

C:\src\nodist [master +1 ~0 -0 !]> .\node_modules\.bin\vows
·····
  v OK » 5 honored (8.936s)

After I npm install, git shows a bunch of new files in the node_modules folder. I would expect the same files would already be checked in, or they would be marked in the .gitignore. I'll leave them be since it seems to be working.

marcelklehr commented 11 years ago

yea. fixed now.