Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit 95cf6d0

Browse files
committed
feat: update mocks-server dependencies to v2 beta and adapt routes and tests
1 parent 8116397 commit 95cf6d0

File tree

13 files changed

+243
-82
lines changed

13 files changed

+243
-82
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
## [unreleased]
88
### Added
99
### Changed
10+
- feat: Update mocks-server dependencies to v2 beta versions and adapt routes and tests.
1011
### Fixed
1112
### Removed
1213

File renamed without changes.
File renamed without changes.
File renamed without changes.

mocks/mocks-server.config.js renamed to mocks/mocks.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ module.exports = {
22
options: {
33
port: 3200,
44
log: "debug",
5+
pathLegacy: "legacy-mocks",
56
},
67
};

mocks/mocks/mocks.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = [
2+
{
3+
id: "base",
4+
routesVariants: ["get-user:1"],
5+
},
6+
{
7+
id: "user2",
8+
routesVariants: ["get-user:2"],
9+
},
10+
];

mocks/mocks/routes/users.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = [
2+
{
3+
id: "get-user",
4+
url: "/api/user",
5+
method: "GET",
6+
variants: [
7+
{
8+
id: "1",
9+
response: {
10+
status: 200,
11+
body: [{ email: "foo@foo.com" }],
12+
},
13+
},
14+
{
15+
id: "2",
16+
response: {
17+
status: 200,
18+
body: [{ email: "foo2@foo2.com" }],
19+
},
20+
},
21+
],
22+
},
23+
];

0 commit comments

Comments
 (0)