Re: Proposal: Write unit tests for JavaScript

2014-08-01 Thread Trey Hunner
Hi Nick, Personally, I think this is a great start. I would like to hear input from others. I appreciate the work you put into manually resolving those jshint warnings. The qunit test style looks good to me too. I added some comments on the pull request with some suggestions for improvements.

Re: Proposal: Write unit tests for JavaScript

2014-08-01 Thread Nick Sandford
So, I have been working a little on a PR for this ( https://github.com/django/django/pull/3003) and having spoken to Tim briefly about getting this supported in jenkins I just wanted to check that the approach was OK. The tests use node, grunt, qunit, istanbul and jshint. Is this a reasonable appro

Re: Proposal: Write unit tests for JavaScript

2014-05-04 Thread Trey Hunner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I started a rough draft of a DEP for adding unit tests for Django's JavaScript: https://github.com/django/deps/pull/4 I am suggesting that a native JavaScript test framework be used *without* attempting to use an adapter to run the tests under the Dja

Re: Proposal: Write unit tests for JavaScript

2014-04-24 Thread Trey Hunner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Kamil, I started another thread related to JS linting: https://groups.google.com/forum/#!topic/django-developers/GUgRMnnC0dM Here is a related pull request: https://github.com/django/django/pull/2577 I have not yet changed the code style of any J

Re: Proposal: Write unit tests for JavaScript

2014-04-24 Thread Trey Hunner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the information Jannis. I hadn't realized that project got to the point of a pull request. Personally I prefer running unit tests without LiveServerTestCase. It seems like LiveServerTestCase should be used for functional tests (using sele

Re: Proposal: Write unit tests for JavaScript

2014-04-22 Thread Kamil GaƂuszka
Hi Trey, You may be interested in this: https://code.djangoproject.com/ticket/20436 I've started to work on this last year on DjangoCon Europe, I never manage to finish my work mostly because of my work on thesis and other stuff. Maybe I will finish this ticket this week and you start writing

Re: Proposal: Write unit tests for JavaScript

2014-04-19 Thread Jannis Leidel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Trey, all, I know we shortly talked about that at PyCon but I forgot to mention that a while ago we took a stab at that already. Sean Bleier was spear heading it and I helped out here and there: https://github.com/sebleier/django/compare/4f3ad28a9b

Re: Proposal: Write unit tests for JavaScript

2014-04-18 Thread Marc Tamlyn
Having worked with both, I'd like to put in a vote for Jasmine over QUnit. Unit test is a Java construct which can feel out of place in Python, never mind JS. I find QUnit clunky and difficult to write, whereas jasmine (as a behavioural tool) is pleasant to write and likely comes closer to the kind

Re: Proposal: Write unit tests for JavaScript

2014-04-18 Thread Trey Hunner
> On 04/16/2014 07:20 PM, Russell Keith-Magee wrote: > > 2) Is there anything that can save us from the Node.js kudzu? :-) Yes. Removing JavaScript from Django. :-) JSHint requires Node.js and running automated JavaScript tests typically requires Node.js and PhantomJS. Node.js is pretty easy to

Re: Proposal: Write unit tests for JavaScript

2014-04-17 Thread Carl Meyer
On 04/16/2014 07:20 PM, Russell Keith-Magee wrote: > On Thu, Apr 17, 2014 at 5:57 AM, Trey Hunner > wrote: > > I saw a previous discussion about JavaScript testing in Django but > it looks like there hasn't been any progress in a few years. > > Some of my

Re: Proposal: Write unit tests for JavaScript

2014-04-17 Thread Matthew Lauber
Regarding running javascript tests, could we consider something like rhino? Just an off the top of my head suggestion. Would avoid node.js, not sure if it's an improvement though. Matt Lauber On Wed, Apr 16, 2014 at 9:20 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Thu, Ap

Re: Proposal: Write unit tests for JavaScript

2014-04-16 Thread Russell Keith-Magee
On Thu, Apr 17, 2014 at 5:57 AM, Trey Hunner wrote: > I saw a previous discussion about JavaScript testing in Django but it > looks like there hasn't been any progress in a few years. > > Some of my thoughts on this issue: > > This would require choosing a JavaScript testing framework. There are

Proposal: Write unit tests for JavaScript

2014-04-16 Thread Trey Hunner
I saw a previous discussion about JavaScript testing in Django but it looks like there hasn't been any progress in a few years. Some of my thoughts on this issue: This would require choosing a JavaScript testing framework. There are many good ones out there. A popular one should probably used f