cht-conf 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +8 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [4.1.0](https://github.com/medic/cht-conf/compare/v4.0.0...v4.1.0) (2024-07-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **#425:** E2E test actions ([#620](https://github.com/medic/cht-conf/issues/620)) ([ba54d49](https://github.com/medic/cht-conf/commit/ba54d49730b73c6d77b219a45b8ba3d98b909227)), closes [#425](https://github.com/medic/cht-conf/issues/425) [#425](https://github.com/medic/cht-conf/issues/425)
|
|
7
|
+
|
|
1
8
|
# [4.0.0](https://github.com/medic/cht-conf/compare/v3.23.0...v4.0.0) (2024-07-01)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -303,8 +303,16 @@ To develop a new action or improve an existing one, check the ["Actions" doc](sr
|
|
|
303
303
|
|
|
304
304
|
## Testing
|
|
305
305
|
|
|
306
|
+
### Unit tests
|
|
307
|
+
|
|
306
308
|
Execute `npm test` to run static analysis checks and the test suite. Requires Docker to run integration tests against a CouchDB instance.
|
|
307
309
|
|
|
310
|
+
### End-to-end tests
|
|
311
|
+
|
|
312
|
+
Run `npm run test-e2e` to run the end-to-end test suite against an actual CHT instance locally. These tests rely on [CHT Docker Helper](https://docs.communityhealthtoolkit.org/hosting/4.x/app-developer/#cht-docker-helper-for-4x) to spin up and tear down an instance locally.
|
|
313
|
+
|
|
314
|
+
The code interfacing with CHT Docker Helper lives in [`test/e2e/cht-docker-utils.js`](./test/e2e/cht-docker-utils.js). You should rely on the API exposed by this file to orchestrate CHT instances for testing purposes. It is preferable to keep the number of CHT instances orchestrated in E2E tests low as it takes a non-negligible amount of time to spin up an instance and can quickly lead to timeouts.
|
|
315
|
+
|
|
308
316
|
## Executing your local branch
|
|
309
317
|
|
|
310
318
|
1. Clone the project locally
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cht-conf",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Configure CHT deployments",
|
|
5
5
|
"main": "./src/lib/main.js",
|
|
6
6
|
"engines": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"eslint": "eslint 'src/**/*.js' test/*.js 'test/**/*.js'",
|
|
12
12
|
"docker-start-couchdb": "npm run docker-stop-couchdb && docker run -d -p 6984:5984 --rm --name cht-conf-couchdb couchdb:2.3.1 && sh test/scripts/wait_for_response_code.sh 6984 200 CouchDB",
|
|
13
13
|
"docker-stop-couchdb": "docker stop cht-conf-couchdb || true",
|
|
14
|
-
"test": "npm run eslint && npm run docker-start-couchdb && npm run clean && mkdir -p build/test && cp -r test/data build/test/data && cd build/test && nyc --reporter=html mocha --forbid-only \"../../test/**/*.spec.js\" && cd ../.. && npm run docker-stop-couchdb",
|
|
14
|
+
"test": "npm run eslint && npm run docker-start-couchdb && npm run clean && mkdir -p build/test && cp -r test/data build/test/data && cd build/test && nyc --reporter=html mocha --forbid-only \"../../test/**/*.spec.js\" --exclude \"../../test/e2e/**/*.spec.js\" && cd ../.. && npm run docker-stop-couchdb",
|
|
15
|
+
"test-e2e": "mocha --config test/e2e/.mocharc.js",
|
|
15
16
|
"semantic-release": "semantic-release"
|
|
16
17
|
},
|
|
17
18
|
"bin": {
|