Closed rfedor-macmillan closed 4 years ago
Sorry for the delay of replying. To run the unit tests, you can simply open the HTML files (testRunner_XXXX.html) in browser, then wait for the result. If anything fails, as normal JavaScript application, error information can be found in the console panel of browser.
Thanks for the response, is there any way to execute all the tests from command line to support continuous integration?
The unit test project are based on Jasmine, which does support both web and node environment. However, all of the tests requiring external data file are written in a AJAX way currently, so they have to be modified to utilizing fs in node. I'll check them soon.
Great, thank you.
The unit tests has been ported to command line environment now. Firstly install Jasmine cli tool by npm install -g jasmine
, then the unit tests can be launched by calling jasmine
at the unitTests directory.
Some source file modifications have been made to adapt to Node environment, so please update the project with latest two commits.
Thank you, this will help a lot in ensuring a reliable build.
Good Day @partridgejiang,
I'm in the process of looking to see how to run the unit tests on the library and was wondering if you can share any details on how to accomplish that? We're wanting to verify changes our branch but have little details on how they're ran and how to debug failures through the those test cases.
Thank you, Roger