elanthia-online / illthorn

Electron-based FE
18 stars 10 forks source link

Document some functions, fix one bug, add unit tests. #152

Closed jasedit closed 3 years ago

jasedit commented 3 years ago

The main contribution here is fixing one bug in adding commands to the command history, and one bug in reading the head element of the limited list. Beyond that, this refactors how index wrapping works in the command history, which avoids if statements in favor of math operations. This also attempts to document the two classes. Finally, this expands unit tests to reach 100% coverage for both as reported by yarn test --coverage, and marks the the resulting coverage folder to be ignored by git.