jList 1.4.0: more validation and a Jasmine test suite

Earlier today I checked version 1.4.0 of jList into GitHub. This version adds:

  • More validation of input parameters
    When I first wrote jList I made a decision that there would be only the minimum validation of input parameters. This was to keep the file size down and also because it was for use by developers who should no better than to miss mandatory parameters. With this release I’ve relented a little – missing parameters will now throw an error. I’m still undecided about adding further validation in future…
  • Compatibility with jsLint Edition 2012-08-23.
    A recent change to jsLint meant that my missing parameter checks:

    if (tyepeof paramname === "undefined")

    were being flagged as errors. As full jsLint compatibility is an important part of jList these have been amended to the more appropriate and acceptable:

    if (paramname === undefined)
  • Jasmine test suite.
    The most significant change for this release isn’t to the code itself – I have added a test suite that allows future changes to be regression tested with the minimum of effort. Written in Javascript using the Jasmine framework, there are 250 tests that validate the output of each function. This is the first time that I have used Jasmine so it took a bit longer than I anticipated to learn the framework (though it is very easy) and create the test suite. It’s not perfect (I’m sure that I will add more tests in future) but it’s a very good start towards ensuring¬†consistency from one change to the next.

jList 1.4.0 can be downloaded for free from GitHub.






Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s