njlyon0 / dndR

Dungeons & Dragons Functions for Players and Dungeon Masters
https://njlyon0.github.io/dndR/
Other
16 stars 2 forks source link

Unit Testing #20

Closed njlyon0 closed 2 months ago

njlyon0 commented 2 months ago

I need to add unit tests for existing functions. Sort of boring but the task will only become worse to tackle as the number and complexity of functions increases ☹️ Can use testthat to make the larger testing infrastructure and other functions in that package for writing the actual testing scripts

njlyon0 commented 2 months ago

dndR Functions

Full list of functions so that I can check off testing script creation as they are written

Helper Function Note

Not going to write tests (at least for now) for any of the functions that don't have any arguments. This includes the small dice functions: coin; d2; d3; d4; d6; d8; d10; d12; d20; d100. As well as the reference vector functions: dnd_classes; dnd_damage_types; dnd_races

njlyon0 commented 2 months ago

Done

Built in at least preliminary unit testing for all functions (except those without arguments as noted above). Should be a much lighter lift to build in new testing as new functions are added and/or existing functions evolve so I'll close this for now.

Seems like v 2.1.0 is shaping up to be a lot of nice best practice internal changes but--relatively--few changes that the average user will likely notice 😅