-----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 JavaScript files because I wasn't certain what style should be used. At this point I think the jshint tool should be used to enforce the default JSHint code style. If style exceptions arise then they can be documented in the .jshintrc file and re-factored later. On 04/22/2014 04:31 AM, Kamil Gałuszka wrote: > 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 UnitTest > for that? > > Cheers > Kamil Gałuszka > > On Saturday, April 19, 2014 1:50:19 PM UTC+2, Jannis Leidel wrote: > > 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/4f3ad28a9b4ffc3ae9866d14f242844d5720b3be...qunit > <https://github.com/sebleier/django/compare/4f3ad28a9b4ffc3ae9866d14f242844d5720b3be...qunit> > > > Sadly we never finished it, even though it was supposed to be merged > together with the LiveServerTestCase. It was providing a "jstest" > management command that was just runserver in disguise with an > enforced URLconf with a few views to render JS test pages. > > The actual core part was a collector for JS test suites > (conventionally placed in <app>/tests/javascript). Each suite could > test any kind of local and remote files and used staticfiles for > serving them. > > I'm not suggesting to re-use this code but wanted to mention that > we've worked on it and found it pretty good (at the time). We just > lacked the time to finish it. Also, some parts are specific to QUnit > but others (like the suite collector) could be reused for other test > runners. > > All in all, I'm all for supporting some way for writing JS tests as > part of Django apps but would be a lot more careful about what > technique/tool to use given the fast paced changes in JS land. I admit > I don't have experience with Jasmine though so take my advise with a > grain of salt :) > > Cheers, > Jannis > > > On 16.04.14 23:57, 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 many good ones out there. A popular one should probably used >> for easier community support. > >> Unit testing JavaScript (ideally) should not require running the >> Django server. > >> JavaScript tests will probably require introducing Node.js into >> the automated testing process. Tests can be run manually from the >> browser, but automated JavaScript tests tend to require Node.js and >> sometimes PhantomJS (for headless testing). > >> The JavaScript tests should be run as part of the CI testing >> process. If the tests are run standalone this should be easy to do >> using a single command (possibly requiring grunt or a similar task >> runner). > >> This seems like it would be a big change, but I think it could be >> done in small steps. Setting up the testing framework is the first >> big step. > >> What do others think about this issue? > >> -- Trey Hunner > >> -- You received this message because you are subscribed to the >> Google Groups "Django developers" group. To unsubscribe from this >> group and stop receiving emails from it, send an email to >> [email protected] <javascript:> >> <mailto:[email protected] > <javascript:>>. To post to >> this group, send email to [email protected] <javascript:> >> <mailto:[email protected] <javascript:>>. Visit this > group at >> http://groups.google.com/group/django-developers > <http://groups.google.com/group/django-developers>. To view this >> discussion on the web visit > > https://groups.google.com/d/msgid/django-developers/CACuWcAwHVJ7HfeWOui3pAT3nQJeABP_Vt5WQe1N5%2BvDs%2Bnt8GQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-developers/CACuWcAwHVJ7HfeWOui3pAT3nQJeABP_Vt5WQe1N5%2BvDs%2Bnt8GQ%40mail.gmail.com> > > > > <https://groups.google.com/d/msgid/django-developers/CACuWcAwHVJ7HfeWOui3pAT3nQJeABP_Vt5WQe1N5%2BvDs%2Bnt8GQ%40mail.gmail.com?utm_medium=email&utm_source=footer > <https://groups.google.com/d/msgid/django-developers/CACuWcAwHVJ7HfeWOui3pAT3nQJeABP_Vt5WQe1N5%2BvDs%2Bnt8GQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>. > >> For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > -- > You received this message because you are subscribed to the Google > Groups "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/19e76ec5-4e27-4012-864a-f73fe8c73d81%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/19e76ec5-4e27-4012-864a-f73fe8c73d81%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout. - -- Trey Hunner http://treyhunner.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTWMTtAAoJEOpnfp/NreonC08IAIPg4vrs4udoWBro3UcjU8bR 2oPre4HMSKNSxM3iAnP7uFfPpV9ZzeuJS/TNasxPPhPpLBLSyNVXnOEaMw75mra8 rgCool0RmC7lstgzs2F2jJWx/0gfu2yie/E4p5+9TbbCvve4PScOQRewDFmFaPcQ DSrZbUT6K4qBTHLuiVj8cqSgA+vDQgWcxKG7vAGbX526aN+WgxrWoAR5gBS54TLW vvHy4XVc/fMeiKWppQ8CbWC4ycMGdVheaBhEY2u1QUmR224l8EcPYryvWm7G6qzB bkF+wVYMLA5bdPaOFA3uir28FCVpJklY/KiNYUr2xGGImfPqsYE9Ly9yJYrgu0I= =Y9ER -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/5358C4ED.8050305%40treyhunner.com. For more options, visit https://groups.google.com/d/optout.
