LiTiang / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Integrate JsTestDriver with assert framework adapters #262

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
JavaScript developers that use assertion framework adapters (QUnit, Jasmine, 
etc.) in their tests, usually make following steps before coding:
1) download assertion framework adapter source code that is compatible with the 
native JsTestDriver assertion framework (i.e. currently used JsTestDriver.jar);
2) configure JsTestDriver to load the adapter before tests.

Obviously any adapter has a dependency on JsTestDriver.jar version, but at 
first glance QUnit and Jasmine adapters do not declare such dependency 
explicitly. IMHO it is not a major issue, but developers should care about it 
at the first time and each time they want to update JsTestDriver.jar or an 
adapter.

Adding explicit dependency to an adapter will solve compatibility issue, but 
develops should still download adapter source code manually.
May be bundling adapters into a JsTestDriver distribution package makes sense.
In such approach compatibility issue will go away and JsTestDriver users will 
have all needed adapters out of the box.

But it will be impossible to load bundled adapters in an old fashion.
Adding new syntax construct to configuration file will be needed:
=== jsTestDriver.conf ===
framework: QUnit # adapter JavaScript source files are embedded into 
JsTestDriver.jar

load:
  - tests/js/*.js
  - src/js/*.js
===

Pros:
 - out of the box adapter
 - configuration file declares used adapter more explicitly, in a less verbose manner
 - no need to manage adapter source files

Thanks!

Original issue reported on code.google.com by Sergey.S...@gmail.com on 8 Aug 2011 at 8:32

GoogleCodeExporter commented 9 years ago

Original comment by Sergey.S...@gmail.com on 22 Aug 2012 at 5:13