0.0.2 • Published 5 years ago
generalcorecomponents v0.0.2
General Core COmponents
Publish
Publish the package with release-it:
npm run-script release_it
Tests
There are two ways to run tests:
- Locally so that tests are run against local db etc
- In Docker when db etc. are created temporary by docker-compose
1. Running locally
Remove all compiled files and install all npm packages:
npm test
Don't remove old files and don't install npm packages:
npm run-script test_fast
Add onlyFdescribe environment value with value true to leave out basicCrudTests that are not fdescribe
onlyFdescribe=true npm run-script test_fast
2. Running in Docker
To run tests in Docker both Docker and docker-compose need to be installed.
Building
docker build . -t generalbackend
Running
docker-compose up --exit-code-from generalback
Environment values
The needed environment variables for tests:
Variable | Service | Info |
---|---|---|
TEST_ENVIRONMENT | Must be 1 to run tests. Outside of test ignored. | |
general_core_test_postgres_db | PostGres | The database name |
general_core_test_postgres_username | PostGres | The host / server |
general_core_test_postgres_password | PostGres | The username for login |
general_core_test_postgres_host | PostGres | The password for login |
general_core_test_postgres_port | PostGres | The port for connection |
general_core_test_mongo_db | Mongo | The database name |
general_core_test_mongo_username | Mongo | The host / server |
general_core_test_mongo_password | Mongo | The username for login |
general_core_test_mongo_host | Mongo | The password for login |
general_core_test_mongo_port | Mongo | The port for connection |
general_core_test_redis_host | Redis | The host for Redis connection |
general_core_test_redis_port | Redis | The port for Redis connection |
0.0.2
5 years ago