Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): allow regexp on Definition#scope and #path #2374



Copy link

No description provided.

Copy link

gr2m commented Jun 27, 2022

Is this fixing an open issue? Can you add any more context about the change? It will help us with the review

Copy link
Contributor Author

This is bug without opened issue. Below are two code examples.


  .reply(200, 'OK')

Same behaviour through define is throw typescript error:

    scope: /example\.com|org/, // Type 'RegExp' is not assignable to type 'string'
    path: /resource\/.+/, // Type 'RegExp' is not assignable to type 'string'
    method: 'GET', 
    response: 'OK',

Copy link

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@gr2m gr2m merged commit 2edf341 into nock:main Jun 30, 2022
16 checks passed
Copy link

🎉 This PR is included in version 13.2.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants