Skip to content

Commit 0a132b6

Browse files
committed
wip scripts
1 parent 9b94730 commit 0a132b6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Diff for: query-connector/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ certificates
66
/playwright-report/
77
/blob-report/
88
/playwright/.cache/
9-
/coverage
9+
/coverage
10+
*-jestCoverageReport.json

Diff for: query-connector/integration.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ docker compose -f docker-compose-integration.yaml up -d
77
# wait for flyway to finish running before...
88
docker compose -f docker-compose-integration.yaml logs -f flyway | grep -q "Successfully applied\|No migration necessary"
99

10+
BASE_CMD="DATABASE_URL=postgresql://postgres:pw@localhost:5432/tefca_db TEST_TYPE=integration jest --testPathPattern=tests/integration"
1011
# running our integration tests
11-
DATABASE_URL=postgresql://postgres:pw@localhost:5432/tefca_db TEST_TYPE=integration jest --testPathPattern=tests/integration --ci --json --coverage --testLocationInResults --outputFile=/coverage/integration/report.json
12+
if [ "$GENERATE_COVERAGE_REPORT" = "true" ]; then
13+
JEST_CMD="$BASE_CMD --ci --json --coverage --testLocationInResults --outputFile=integration-jestCoverageReport.json"
14+
else
15+
JEST_CMD="$BASE_CMD"
16+
fi
17+
eval $JEST_CMD
1218
JEST_EXIT_CODE=$?
1319

1420
# Teardown containers

Diff for: query-connector/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
"start": "NODE_TLS_REJECT_UNAUTHORIZED=0 node .next/standalone/server.js",
1414
"lint": "next lint",
1515
"test": "npm run test:unit && npm run test:integration",
16+
"test:ci": "npm run test:unit:ci && npm run test:integration:ci",
1617
"test:unit": "jest --testPathIgnorePatterns='/e2e/' '/integration/'",
17-
"test:unit:ci": "npm run test:unit -- --ci --json --coverage --testLocationInResults --outputFile=./unit/report.json",
18+
"test:unit:ci": "npm run test:unit -- --ci --json --coverage --testLocationInResults --outputFile=unit-jestCoverageReport.json ",
1819
"test:unit:watch": "jest --watch",
1920
"test:integration": "bash ./integration.sh",
21+
"test:integration:ci": "GENERATE_COVERAGE_REPORT=true bash ./integration.sh",
2022
"test:playwright": "docker compose -f ./docker-compose-e2e.yaml build --no-cache && docker compose -f ./docker-compose-e2e.yaml up -d && npx playwright test --reporter=list",
2123
"test:playwright:local": "dotenv -e ./.env -- npx playwright test --ui",
2224
"cypress:open": "cypress open",

0 commit comments

Comments
 (0)