Skip to content

Commit c34f14f

Browse files
committed
Fix tests
1 parent cbc4283 commit c34f14f

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

packages/blocks/http/test/webhook-url-validator.test.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,6 @@ describe('webhook-url-validator', () => {
4747
);
4848
});
4949

50-
it('should re-throw the error if the URL matches regex but has different origin', async () => {
51-
// In reality, it will throw because it won't pass the regex (since regex includes publicUrl)
52-
// but let's test if we can somehow hit the "return userUrl" branch at line 30.
53-
// If publicUrl is 'https://app.openops.com/'
54-
// escapedBase is 'https:\/\/app\.openops\.com\/'
55-
// regex is '^https:\/\/app\.openops\.com\/v1/webhooks/[0-9a-zA-Z]{21}/sync$'
56-
// To pass regex, the URL MUST start with the publicUrl.
57-
// So let's see if origin comparison could still fail?
58-
// Maybe with case differences or port differences?
59-
// But URL origin and regex should match.
60-
// Let's test the main rewrite case.
61-
});
62-
6350
it('should rewrite the URL to internal API URL when it is a valid system webhook', async () => {
6451
const webhookId = 'abc123456789012345678';
6552
const userUrl = `${publicUrl}v1/webhooks/${webhookId}/sync`;

0 commit comments

Comments
 (0)