JohnAustinDev / xulsword

Automatically exported from code.google.com/p/xulsword
17 stars 6 forks source link

issue #272 - Refactor the xulswordTest.js file for use in the jest environment #273

Closed tomr2k closed 2 years ago

tomr2k commented 2 years ago

The original xulsword library test file (xulswordTest.js) was renamed to libxulsword.test.js according to jest's naming convention. This new file was refactored to take full advantage of the jest testbench. Several additional changes were made to provide jest development support within the vscode environment. These include:

Successful testing requires a .crosswire directory in the developer's $HOME directory containing at a minimum the KJV, UZV bibles and Pilgrim's Progress. The first three tests check for a properly configured crosswire directory. If these fail virtually all subsequent tests will fail as well.

One test related issue: two of the libxulsword tests fail. Apparently the UZV translation book of Psalms contains 151 chapters but the version I have shows only 150. Have I loaded the correct module or was the original test incorrect?

JohnAustinDev commented 2 years ago

This looks great. The new UZV Psalms has 150 chapters, so the test result just needs updating.