dfe-analytical-services / local-authority-interactive-tool

Local Authority Interactive Tool
https://department-for-education.shinyapps.io/local-authority-interactive-tool/
MIT License
1 stars 0 forks source link

Improvement: Add unit tests on LA Level #9

Open JT-39 opened 2 months ago

JT-39 commented 2 months ago

Improvement Overview

Currently there is no testing on any of the functions used to build the LA Level page. These need to be designed and added to ensure that the functions are doing what they are supposed to and that this behaviour remains the same when the next pages of LAIT are added.

Current Issue

There are no unit tests in the project, which leaves the code vulnerable to faulty functions or function behaviour broken by future code updates/ changes.

Proposed Enhancement

To add unit tests for all major functions (those included in R/fn_... analysis.R, helper_functions.R, and load_data.R.

Impact

This will improve the sustainability of the code, reduce the chance of major code refactoring down the line and generally improve the codebase.

Additional Information

Unit tests will be applied to all functions, though this may be an iterative process for those that are less critical.

JT-39 commented 2 months ago

This needs to be revisited to finish adding tests for the plotting functions in fn_plotting.R.