Skip to content

feat(Tests): Add require interceptor in tests - #8758

Merged
gatzjames merged 4 commits into
Kong:developfrom
gatzjames:feat/test-require-guard
May 28, 2025
Merged

feat(Tests): Add require interceptor in tests#8758
gatzjames merged 4 commits into
Kong:developfrom
gatzjames:feat/test-require-guard

Conversation

@gatzjames

Copy link
Copy Markdown
Contributor

Highlights:

  • Adds the same requireInterceptor we use in pre-request/after-response scripts to mocha tests
  • Adds an e2e test to verify that arbitarty require doesn't work in tests and that dependencies like chai-json-schema are loaded properly

Comment on lines +91 to +92
type: http
scheme: basic

Check failure

Code scanning / Semgrep OSS

Semgrep Finding: yaml.openapi.security.use-of-basic-authentication.use-of-basic-authentication

Basic authentication is considered weak and should be avoided. Use a different authentication scheme, such of OAuth2, OpenID Connect, or mTLS.
@gatzjames
gatzjames force-pushed the feat/test-require-guard branch from 57f347a to 3f824d8 Compare May 27, 2025 14:08
@gatzjames
gatzjames force-pushed the feat/test-require-guard branch from 3f824d8 to d6987ad Compare May 28, 2025 08:46
@gatzjames
gatzjames enabled auto-merge (squash) May 28, 2025 08:46
@gatzjames
gatzjames merged commit 3145b57 into Kong:develop May 28, 2025
@gatzjames
gatzjames deleted the feat/test-require-guard branch May 28, 2025 08:59
cwangsmv pushed a commit that referenced this pull request Jun 10, 2025
* block requiring arbitary modules in test scripts

* cleanup log

* fix require/chai issues

* update tests
RoamingLost pushed a commit to RoamingLost/insomnia that referenced this pull request Aug 6, 2025
* block requiring arbitary modules in test scripts

* cleanup log

* fix require/chai issues

* update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants