Skip to content

Unit tests #28

Description

@rellimylime

Unit Tests

One test file per exported function (test-wri_overview.R, test-layer_info.R, test-get_layer.R).

For each function, test at least:

  • Success: valid inputs return the expected output type and structure
  • Input validation: invalid inputs (wrong bbox length, out-of-extent, non-numeric) throw informative errors
  • Edge cases: bbox at dataset edge, requesting a layer that exists but isn't hosted yet
  • Return structure: for get_layer, confirm output is a SpatRaster, has correct CRS (EPSG:5070), and extent matches input bbox

General:

  • One test_that() block per behavior
  • All tests pass check() without warnings or notes

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions