Added unit tests

This commit is contained in:
2025-06-20 09:47:04 +02:00
parent 0f487e3f93
commit a987c0fb34
5 changed files with 182 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
<h6><i>real-time weather forecast service</i></h6>
[![](https://github.com/ceticamarco/zephyr/actions/workflows/docker.yml/badge.svg)](https://github.com/ceticamarco/zephyr/actions/workflows/docker.yml)
[![](https://github.com/ceticamarco/zephyr/actions/workflows/tests.yml/badge.svg)](https://github.com/ceticamarco/zephyr/actions/workflows/tests.yml)
</div>
@@ -163,7 +164,7 @@ will yield
}
```
> [!INFO]
> [!NOTE]
> To convert OpenWeatherMap's moon phase value to the illumination percentage,
> I've used the following formula:
>
@@ -333,5 +334,12 @@ This will build the container image and start the service in detached mode. By d
the service will be available at `http://127.0.0.1:3000`, but you can easily change this property
but editing the `compose.yml` as stated above.
## Unit tests
You can run the unit tests by issuing the following command:
```sh
go test ./... -v
```
## License
This software is released under the GPLv3 license. You can find a copy of the license with this repository or by visiting the [following page](https://choosealicense.com/licenses/gpl-3.0/).