Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into feature/37070-webhooks
Browse files Browse the repository at this point in the history
# Conflicts:
#	paypal-commercetools-extension/tests/post-deploy.spec.ts
  • Loading branch information
mbe1987 committed Sep 16, 2024
2 parents 248a083 + 1deb457 commit 51ed6db
Show file tree
Hide file tree
Showing 8 changed files with 1,077 additions and 1,297 deletions.
1,058 changes: 402 additions & 656 deletions paypal-commercetools-custom-application/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion paypal-commercetools-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"axios": "^1.5.1",
"body-parser": "^1.20.2",
"dotenv": "^16.3.1",
"express": "^4.19.2",
"express": "^4.21.0",
"listr2": "^6.6.1",
"validator": "^13.11.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const findMatchingSubscription = async (
return subscriptions.length > 0 ? subscriptions[0] : undefined;
}
const fittingSubscriptions = subscriptions.filter(
(subscription) =>
subscription.destination.type === 'GoogleCloudPubSub' &&
subscription.destination.topic === topic &&
subscription.destination.projectId === projectId
({ destination }) =>
destination.type === 'GoogleCloudPubSub' &&
destination.topic === topic &&
destination.projectId === projectId
);
return fittingSubscriptions.length > 0 ? fittingSubscriptions[0] : undefined;
};
697 changes: 355 additions & 342 deletions paypal-commercetools-events/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion paypal-commercetools-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"axios": "^1.5.1",
"body-parser": "^1.20.0",
"dotenv": "^16.0.3",
"express": "4.19.2",
"express": "4.21.0",
"nodemailer": "^6.9.10",
"validator": "^13.7.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,8 @@ export async function findMatchingExtension(
.execute();

const matchingExtensions = extensions.filter(
(extension) =>
extension.destination.type === 'HTTP' &&
extension.destination.url === applicationUrl
({ destination }) =>
destination.type === 'HTTP' && destination.url === applicationUrl
);
return matchingExtensions.length > 0 ? matchingExtensions[0] : undefined;
}
9 changes: 6 additions & 3 deletions paypal-commercetools-extension/tests/pre-undeploy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ const mockConfigModule = () => {
customObjects: jest.fn(() => apiRoot),
extensions: jest.fn(() => apiRoot),
withKey: jest.fn(() => apiRoot),
withContainerAndKey: jest.fn(() => apiRoot),
delete: jest.fn(() => apiRequest),
get: jest.fn(() => apiRequest),
post: jest.fn(() => apiRequest),
};
jest.mock('../src/client/create.client', () => {
return {
Expand All @@ -40,8 +42,9 @@ describe('Testing pre undeploy', () => {
test('Testing pre undeploy', async () => {
require('../src/connector/pre-undeploy');
await sleep(5000);
expect(apiRoot.delete).toBeCalledTimes(2);
expect(apiRoot.get).toBeCalledTimes(2);
expect(apiRequest.execute).toBeCalledTimes(4);
expect(apiRoot.delete).toBeCalledTimes(3);
expect(apiRoot.get).toBeCalledTimes(5);
expect(apiRoot.post).toBeCalledTimes(2);
expect(apiRequest.execute).toBeCalledTimes(10);
}, 15000);
});
593 changes: 306 additions & 287 deletions paypal-commercetools-extension/yarn.lock

Large diffs are not rendered by default.

0 comments on commit 51ed6db

Please sign in to comment.