-----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/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] > <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/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>. > For more options, visit https://groups.google.com/d/optout. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTUmL6AAoJEMeVlW+0idypTNYP/37E7THRsG1BG5uc55nVkTSP tZ6l7XaOtCfwv82N0sXHVGbBek1UPXfm+3VENAZBxrMyJdGybTcn9q6RGXeKsPE6 xunFI1IuHEMjzBG6KcL0d2t3CVOeGIMvTNkn3Lr7FM3bl7JYds5PtsislUiH56sY qDoDkKP+GXglH5sswxB54vyiAf85g7Rh7wcq0klxlLy1D46aH+NqrVFMqWirb1Rr KVk4Y8H3khRMrOyz17yF/s7Qkbtj3zP+5W1UG3AZZlDYjxMF6sRl+2oTsT27oq31 hSLyhEJ6+3RhSTwPnK2OzNa4LtqJaOlv7+mwOgwiFy77BDFNrOhbBITKvTguYnNU e46QgzGOAUqNv+bxV7gksdWX3oWLjgvbHrkVISPjlaxbRowRURrYPOyuflZMQoOP aVmVRiWw0WcwqYrJyGiPJzsctTjcK4r1sflW6XN0zSJCgohHTkVH1cvnAQRWIfKB dHwjfwXOyaAYAtE2gE2+/jRn93Oq6HS8Lj8msV8uIceHxW9g5VkcNlIoDEzlgTUA zq7Ef8dy/TP/o4jjamv3Td5l0DOVF2ldFGkGbD9US2PuILiuKxB65ViQnRdVFP29 DlEBd9zYDUfB8d2idsyXZeKIyvwy/m3D//fIwssHTpHEEF5UiQFWTMgSatBZSO5k 8Khnw7JwOFt0ybvHcS25 =8lha -----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/535262FB.9060704%40gmail.com. For more options, visit https://groups.google.com/d/optout.
