reboundjs / rebound

Automatic data binding for backbone using HTMLBars.
MIT License
43 stars 4 forks source link

Running test modifies the built files #33

Closed jamesplease closed 9 years ago

jamesplease commented 9 years ago

npm run test seems to also build the library, which is undesirable. If I make a change, I should be able to run the tests without building things.

With that said, there don't seem to be any tests right now, so maybe npm run test should be a noop for now?

amiller-gh commented 9 years ago

There are tests, they live in packages/<name-of-package>/test/<name-of-test-suite>.js. I normally run npm start and navigate to localhost:8000/test in my browser. I took a look and it seems like connect/qunit is having problems with require when run in the command line.

The grunt test command re-building the project is left over from a when the /dist directory was included in the project's .gitignore and someone with a fresh checkout (like travis) wouldn't be able to run npm test without building first. Now that the dist directory is part of the repository it, you're right, it isn't needed any more!

amiller-gh commented 9 years ago

@jmeas, I found our problem. The tests aren't running server side because of requirejs' asynchronous calls to get the test files: http://stackoverflow.com/questions/15716238/qunit-autostart

I'll have it fixed in my next commit.

amiller-gh commented 9 years ago

Resolved in https://github.com/epicmiller/rebound/commit/412ccd9c33a301f967b13179043a51adf6514b2c