Skip to content

Commit 4e732bc

Browse files
Updated support for --experimental-vm-modules
1 parent 8fc3ffc commit 4e732bc

File tree

8 files changed

+578
-1522
lines changed

8 files changed

+578
-1522
lines changed

services/ehr-out-service/package-lock.json

Lines changed: 552 additions & 1457 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/ehr-out-service/package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
"start:local": "babel-node src/server.js",
1313
"start:nodemon": "nodemon --exec npm run start:local",
1414
"test": "npm run lint:fix && npm run test:unit",
15-
"test:unit": "jest \"src/(?!(.*\\integration.test\\.js))\" --setupFiles",
16-
"test:integration": "jest \"src/.*\\integration.test\\.js\" --detectOpenHandles --forceExit --setupFiles dotenv/config",
15+
"test:unit": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js \"src/(?!(.*\\integration.test\\.js))\" --setupFiles",
16+
"test:integration": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js \"src/.*\\\\integration.test\\\\.js\" --runInBand --no-cache --detectOpenHandles --forceExit --setupFiles dotenv/config",
1717
"test:health": "jest test/functional/health.test.js",
1818
"test:docker": "npm run test:health",
1919
"test:functional": "jest test/functional/*",
2020
"test:e2e": "jest test/e2e/*",
21-
"test:coverage": "jest src/ --maxWorkers=1 --coverage --detectOpenHandles --forceExit --setupFiles dotenv/config",
22-
"test:coverage-unit-test-only": "jest \"src/(?!(.*\\integration.test\\.js))\" --maxWorkers=1 --coverage --detectOpenHandles --forceExit --setupFiles dotenv/config"
21+
"test:coverage": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js src/ --maxWorkers=1 --coverage --detectOpenHandles --forceExit --setupFiles dotenv/config",
22+
"test:coverage-unit-test-only": ".node --experimental-vm-modules ./node_modules/jest/bin/jest.js \"src/(?!(.*\\integration.test\\.js))\" --maxWorkers=1 --coverage --detectOpenHandles --forceExit --setupFiles dotenv/config"
2323
},
2424
"dependencies": {
2525
"@aws-sdk/client-dynamodb": "^3.529.1",
@@ -28,7 +28,6 @@
2828
"@babel/runtime": "^7.17.8",
2929
"axios": "^1.7.2",
3030
"dotenv": "^16.0.0",
31-
"expect": "^29.3.1",
3231
"express": "^4.19.2",
3332
"express-validator": "^6.14.0",
3433
"lodash.chunk": "^4.2.0",
@@ -57,7 +56,7 @@
5756
"eslint-config-prettier": "^8.5.0",
5857
"eslint-plugin-jest": "^26.1.2",
5958
"eslint-plugin-prettier": "^4.0.0",
60-
"jest": "^28.1.3",
59+
"jest": "^29.7.0",
6160
"nock": "^13.2.4",
6261
"nodemon": "^2.0.19",
6362
"prettier": "2.6.0",

services/ehr-out-service/src/config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const portNumber = 3000;
33
export const config = () => ({
44
nhsEnvironment: process.env.NHS_ENVIRONMENT || 'local',
55
repoToGpServiceUrl: process.env.SERVICE_URL || `http://127.0.0.1:${portNumber}`,
6-
gp2gpMessengerServiceUrl: process.env.GP2GP_MESSENGER_SERVICE_URL,
6+
gp2gpMessengerServiceUrl: process.env.GP2GP_MESSENGER_SERVICE_URL || 'http://www.notreal.com',
77
gp2gpMessengerAuthKeys: process.env.GP2GP_MESSENGER_AUTHORIZATION_KEYS,
88
ehrRepoServiceUrl: process.env.EHR_REPO_SERVICE_URL,
99
ehrRepoAuthKeys: process.env.EHR_REPO_AUTHORIZATION_KEYS,

services/ehr-out-service/src/services/database/dynamodb/__tests__/ehr-core-repository.integration.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const INBOUND_FRAGMENT_IDS = [uuid().toUpperCase(), uuid().toUpperCase(), uuid()
2121
const ODS_CODE = 'B12345';
2222

2323
describe('ehr-core-repository', () => {
24-
afterAll(async () => {
24+
afterEach(async () => {
2525
await cleanupRecordsForTest(INBOUND_CONVERSATION_ID);
2626
});
2727

services/ehr-out-service/src/services/database/dynamodb/__tests__/outbound-conversation-repository.integration.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('outbound-conversation-repository', () => {
3939
const ODS_CODE = 'B12345';
4040
const db = EhrTransferTracker.getInstance();
4141

42-
afterAll(async () => {
42+
afterEach(async () => {
4343
await cleanupRecordsForTest(INBOUND_CONVERSATION_ID);
4444
});
4545

services/ehr-out-service/test/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const SQS_EHR_OUT_INCOMING_QUEUE_NAME = 'test-ehr-out-service-incoming';
22
const AWS_ACCOUNT_NO = '000000000000';
3-
let localstackEndpointUrl = process.env.LOCALSTACK_URL;
3+
let localstackEndpointUrl = process.env.LOCALSTACK_URL || 'http://localhost:4566';
44
export const config = {
55
nhsEnvironment: process.env.NHS_ENVIRONMENT,
66
serviceUrl: process.env.SERVICE_URL,

services/ehr-repo/src/__tests__/app.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('app', () => {
3030
request(app)
3131
.get('/swagger/index.html')
3232
.expect(200)
33-
.expect('Content-Type', 'text/html; charset=UTF-8')
33+
.expect('Content-Type', 'text/html; charset=utf-8')
3434
.end(done);
3535
});
3636
});

services/mesh-forwarder/Pipfile.lock

Lines changed: 16 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)