We didn't implement automated deployment yet to our Angular 7 project, so environment-based variables (e.g baseUrl) are changed manually, causing the application to crash after deployment a lot due to wrong variable values.
Does it make sense to write some environment-specific tests to ensure that the correct values are being passed and set and how to go about this (e.g. conditional statements based on node_env, separate test files for each environment, ...)?
Things I want to keep in mind are:
- Code coverage
- Applying DRY to not repeat tests that wouldn't be different based on different environments
- Should I use E2E or unit tests or both for the mentioned purpose.