Skip to content

Commit

Permalink
Merge #1908
Browse files Browse the repository at this point in the history
1908: fix(msw): rename /_mocks/ endpoint to /_msw/ to avoid clashes r=ZauberNerd a=ZauberNerd


<details>
<summary>Bors merge bot cheat sheet</summary>

We are using [bors-ng](https://github.com/bors-ng/bors-ng) to automate merging of our pull requests. The following table provides a summary of commands that are available to reviewers (members of this repository with push access) and delegates (in case of `bors delegate+` or `bors delegate=[list]`).

| Syntax | Description |
| --- | --- |
| bors merge | Run the test suite and push to master if it passes. Short for "reviewed: looks good." |
| bors merge- | Cancel an r+, r=, merge, or merge= |
| bors try | Run the test suite without pushing to master. |
| bors try- | Cancel a try |
| bors delegate+ | Allow the pull request author to merge their changes. |
| bors delegate=[list] | Allow the listed users to r+ this pull request's changes. |
| bors retry | Run the previous command a second time. |

This is a short collection of opinionated commands. For a full list of the commands read the [bors reference](https://bors.tech/documentation/).

</details>


Co-authored-by: ZauberNerd <[email protected]>
  • Loading branch information
bors[bot] and ZauberNerd authored Jul 5, 2021
2 parents 61eedbc + 93a446d commit 220d5be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/msw/integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const mockDeleteRequest = (pathName, data) => {

/** @type {import('hops-msw/integration').registerServerMocks} */
const registerServerMocks = async (...mocks) => {
await fetch(getMockEndpoint('/_mocks/register'), {
await fetch(getMockEndpoint('/_msw/register'), {
method: 'POST',
headers: {
'content-type': 'application/json',
Expand All @@ -83,7 +83,7 @@ const registerServerMocks = async (...mocks) => {

/** @type {import('hops-msw/integration').resetServerMocks} */
const resetServerMocks = async () => {
await fetch(getMockEndpoint('/_mocks/reset'));
await fetch(getMockEndpoint('/_msw/reset'));
};

module.exports = {
Expand Down
4 changes: 2 additions & 2 deletions packages/msw/mixin.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = class MswMixin extends Mixin {

middlewares.initial.push({
method: 'post',
path: '/_mocks/register',
path: '/_msw/register',
handler: [
bodyParserJson(),
(req, res) => {
Expand Down Expand Up @@ -99,7 +99,7 @@ module.exports = class MswMixin extends Mixin {

middlewares.initial.push({
method: 'get',
path: '/_mocks/reset',
path: '/_msw/reset',
handler: (_, res) => {
mockServer.resetHandlers();

Expand Down

0 comments on commit 220d5be

Please sign in to comment.