timrwood/moment — Issue #155: Testing process is suboptimal.
Author: rockymeza
Created: 2012-02-02 20:45:37+00:00
State: open

If I am mistaken about this, please ignore the rest.

As far as I can tell, in order to test moment, you need to build the HTML site. I don't think this is a good idea for several reasons:

1. It slows down the testing process. Testing should be fast to encourage people to test.
2. It's not immediately obvious. From a new contributor's point of view, simply running `$ node test.js` seems like the correct way to test.
3. It dirties up commits. I think that commits should be as atomic as possible and should only contain the changes necessary. The additional changes could make pull requests difficult to merge in.

In addition, I feel that the test output is inappropriate for a terminal. I usually have to `grep` it in order to find failures.

Right now, in order to run the tests, I have to do this:

```shell
$ node build.js && node test.js | grep fail
```

Instead I feel that it should be simple, like this:

```shell
$ node test.js
```