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

Trailing slashed handling #32

Open
lukaszfiszer opened this issue May 21, 2021 · 3 comments
Open

Trailing slashed handling #32

lukaszfiszer opened this issue May 21, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lukaszfiszer
Copy link
Member

The current mock mechanism is "strict" regarding trailing slashes:

mockiavelli.mockGET('/example', {status: 200})
// GET /example/ => 404

This behaviour should be at least configurable to allow ignoring trailing slashes:

const mockiavelli = await Mockiavelli.setup(page, {ignoreTrailingSlashes: true});
mockiavelli.mockGET('/example', {status: 200})
// GET /example/ => 200
@benmanuel12
Copy link

Hi, I'm a newbie to contributing to projects and I am trying to take a look at this.

@lukaszfiszer
Copy link
Member Author

hi @benmanuel12! That would be great - PRs are welcomed.

@benmanuel12
Copy link

Hi, @lukaszfiszer,
I haven't been able to find a working way to prove that the repo's code works for me as a base line before I try and add the feature.
I'm starting to feel a little stupid.
A slightly modified copy of one of your examples is refusing connection on localhost for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants