maxime.vidori at enovance.com
Tue Nov 26 14:29:25 UTC 2013
I made a little POC about Nodejs integration with its task runner Grunt https://review.openstack.org/58525
It is easy to configure and override, we have more flexibility with this solution.
Running Selenium which will run Firefox which will launch an html page with js embedded seems really overkill. It provides a lot of complexity and we have to manipulate the file launched by Firefox if we want a little modification or just test a single file.
Currently all files are tested together with all the tests without any control. Imagine testing the backend this way, launching all the tests just for looking at your modifications. No command line support in development implies a lack of automatisation, and a lack of automatisation lead to a lose of time.
In the other hand, grunt allows us to launch tests on a specific file or all libraries. We can make specific tasks really fast with a better readability. I encourage you to think of the further developments and to think of all the pro and cons of these solutions. Just test it and look at the documentation with all the plugins (unit testing, less compilation, jshint checking, angular testing), this is just configuration and no development, with a great community which will allow us to focus on the Horizon development and not wasting times on external tools.
----- Original Message -----
From: "Imre Farkas" <ifarkas at redhat.com>
To: openstack-dev at lists.openstack.org
Sent: Tuesday, November 26, 2013 1:42:26 PM
On 11/22/2013 06:13 PM, Julie Pichon wrote:
> "Imre Farkas" <ifarkas at redhat.com> wrote:
>> On 11/22/2013 02:49 PM, Maxime Vidori wrote:
>>>> It seems a bit crazy to me to introduce NodeJS as a dependency just for
>>>> the sake of an easy way to run jslint. There are other options
>>>> available that run without NodeJS as a dependency.
>>> Sadly, the only solutions which try to implement jslint in pure python are
>>> in alpha or abandoned. If you have a python library which has the same
>>> quality as jslint (which is written by Douglas Crockford himself), I will
>>> be glad to take a look at it.
>> There's a jslint fork called jshint which is able to run in the browser
>> without any node.js dependency.
>> I created a POC patch  long time ago to demonstrate its capabilities.
>> It's integrated with qunit and runs automatically with the horizon test
> Thanks Imre, this is interesting. Would you mind restoring the patch? If
> you don't have time to work on it please indicate so (I don't think it's
> possible to pick up a patch if the status is 'Abandoned') and someone else
> can look into the test failures.
I restored the patch, rebased, fixed the tests, added the test files as
Radomir suggested and removed the .jshintrc file.
The original patch was WIP and I left the failing tests intentionally,
so that it was easier to compare the two solutions (node.js vs pure
qunit). But as I wrote, it's cleaned up by now and only contains the latter.
>> The patch also contains a .jshintrc file for the node.js package but you
>> can remove it since it's not used by the qunit+jshint test at all.
> Sounds good.
>>  https://review.openstack.org/#/c/41087/
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
More information about the OpenStack-dev