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

Commit 5a3bedb

Browse files
committed
chore(deps): Update core dependency
1 parent 0951e32 commit 5a3bedb

File tree

6 files changed

+39
-19
lines changed

6 files changed

+39
-19
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1212
### Fixed
1313
### Removed
1414

15+
## [2.0.0-beta.2] - 2021-01-16
16+
17+
### Changed
18+
- chore(deps): Update mocks-server/core dependency. Adapt tests.
19+
1520
## [2.0.0-beta.1] - 2021-01-14
1621

1722
### Added

package-lock.json

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mocks-server/plugin-admin-api",
3-
"version": "2.0.0-beta.1",
3+
"version": "2.0.0-beta.2",
44
"description": "Mocks Server plugin providing a REST API for administration",
55
"keywords": [
66
"mocks-server-plugin",
@@ -37,7 +37,7 @@
3737
"express": "4.17.1"
3838
},
3939
"devDependencies": {
40-
"@mocks-server/core": "2.0.0-beta.1",
40+
"@mocks-server/core": "2.0.0-beta.2",
4141
"cross-fetch": "3.0.6",
4242
"eslint": "7.19.0",
4343
"eslint-plugin-no-only-tests": "2.4.0",

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sonar.organization=mocks-server
22
sonar.projectKey=mocks-server-plugin-admin-api
3-
sonar.projectVersion=2.0.0-beta.1
3+
sonar.projectVersion=2.0.0-beta.2
44

55
sonar.javascript.file.suffixes=.js
66
sonar.sourceEncoding=UTF-8

test/e2e/mocks-api.spec.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,24 @@ describe("mocks api", () => {
2626
it("should return current mocks", async () => {
2727
const response = await fetch("/admin/mocks");
2828
expect(response.body).toEqual([
29-
{ id: "base", routesVariants: ["get-users:success", "get-user:1"] },
30-
{ id: "user-2", routesVariants: ["get-users:success", "get-user:2"] },
31-
{ id: "user-real", routesVariants: ["get-users:success", "get-user:real"] },
29+
{
30+
id: "base",
31+
from: null,
32+
routesVariants: ["get-users:success", "get-user:1"],
33+
appliedRoutesVariants: ["get-users:success", "get-user:1"],
34+
},
35+
{
36+
id: "user-2",
37+
from: "base",
38+
routesVariants: ["get-user:2"],
39+
appliedRoutesVariants: ["get-users:success", "get-user:2"],
40+
},
41+
{
42+
id: "user-real",
43+
from: "base",
44+
routesVariants: ["get-user:real"],
45+
appliedRoutesVariants: ["get-users:success", "get-user:real"],
46+
},
3247
]);
3348
});
3449
});
@@ -38,7 +53,9 @@ describe("mocks api", () => {
3853
const response = await fetch("/admin/mocks/base");
3954
expect(response.body).toEqual({
4055
id: "base",
56+
from: null,
4157
routesVariants: ["get-users:success", "get-user:1"],
58+
appliedRoutesVariants: ["get-users:success", "get-user:1"],
4259
});
4360
});
4461
});
@@ -48,7 +65,9 @@ describe("mocks api", () => {
4865
const response = await fetch("/admin/mocks/user-2");
4966
expect(response.body).toEqual({
5067
id: "user-2",
51-
routesVariants: ["get-users:success", "get-user:2"],
68+
from: "base",
69+
routesVariants: ["get-user:2"],
70+
appliedRoutesVariants: ["get-users:success", "get-user:2"],
5271
});
5372
});
5473
});

test/e2e/routes-api.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ describe("routes api", () => {
2828
expect(response.body).toEqual([
2929
{
3030
id: "get-user",
31+
delay: null,
3132
url: "/api/users/:id",
3233
method: "GET",
3334
variants: ["get-user:1", "get-user:2", "get-user:real"],
3435
},
3536
{
3637
id: "get-users",
38+
delay: null,
3739
url: "/api/users",
3840
method: "GET",
3941
variants: ["get-users:success", "get-users:error"],
@@ -47,6 +49,7 @@ describe("routes api", () => {
4749
const response = await fetch("/admin/routes/get-user");
4850
expect(response.body).toEqual({
4951
id: "get-user",
52+
delay: null,
5053
url: "/api/users/:id",
5154
method: "GET",
5255
variants: ["get-user:1", "get-user:2", "get-user:real"],
@@ -59,6 +62,7 @@ describe("routes api", () => {
5962
const response = await fetch("/admin/routes/get-users");
6063
expect(response.body).toEqual({
6164
id: "get-users",
65+
delay: null,
6266
url: "/api/users",
6367
method: "GET",
6468
variants: ["get-users:success", "get-users:error"],

0 commit comments

Comments
 (0)