Running tests

44 views
Skip to first unread message

aslak hellesoy

unread,
Dec 10, 2013, 12:37:45 PM12/10/13
to sha...@googlegroups.com
I feel kind of stupid asking this, but I can't figure out how to run sharejs' tests. Nothing is set up for `npm test`, the Makefile doesn't have any test targets. I see package.json has mocha in it, but not sure how to launch coffee tests with mocha. I tried `node_modules/.bin/mocha --require coffee-script --compilers coffee:coffee-script` but no dice.

Come on guys, documenting or even scripting this is easy.

Aslak

Rus Werner

unread,
Dec 10, 2013, 1:39:55 PM12/10/13
to sha...@googlegroups.com
Run "cake test". You need to have nodeunit installed and run "cake webclient" first to generate the js files.


--
You received this message because you are subscribed to the Google Groups "ShareJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sharejs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Russel Werner
Ceros | Director UI Engineering

Friedel Ziegelmayer

unread,
Dec 10, 2013, 2:09:41 PM12/10/13
to Rus Werner, sha...@googlegroups.com
They are broken, because Joseph ripped out the gruntfile without taking a look what it was doing.
You can take a look at what is missing here [1].
Intermediate solution

$ npm install -g mocha karma coffee-script
$ mocha --compilers coffee:coffee-script # Unit server tests
$ karma start --single-run               # Unit browser tests

For more info on karma see here [2], but the second command won't execute as you need
to run a test server in test/helpers/server.coffee as you can see in the grunt file that was removed.
So no need to feel dumb, it's just broken.

Cheers
dignifiedquire


[1]: https://github.com/share/ShareJS/commit/19d406b65d608fef6657bc59c42d5ad763b11332
[2]: http://karma-runner.github.io

-- 
dignifiedquire
>*Ceros* | Director UI Engineering
Reply all
Reply to author
Forward
0 new messages