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

Commit 0852d1d

Browse files
authored
Merge pull request #13 from mocks-server/v1.4.0
V1.4.0
2 parents 245a514 + c44d89c commit 0852d1d

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1414
### Fixed
1515
### Removed
1616

17-
## [1.3.2] - 2020-01-11
17+
## [1.4.0] - 2020-01-12
18+
### Added
19+
- Add display name
20+
21+
## [1.3.2] - 2020-01-12
1822
### Changed
1923
- Update dependencies
2024

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mocks-server/plugin-admin-api",
3-
"version": "1.3.2",
3+
"version": "1.4.0",
44
"description": "Plugin for Mocks Server. Provides a REST API for administrating settings, fixtures and behaviors",
55
"keywords": [
66
"mocks-server-plugin",

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=1.3.2
3+
sonar.projectVersion=1.4.0
44

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

src/Plugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const {
1818
FIXTURES
1919
} = require("@mocks-server/admin-api-paths");
2020

21+
const packageInfo = require("../package.json");
2122
const DeprecatedApi = require("./deprecated/Api");
2223

2324
const Settings = require("./Settings");
@@ -59,6 +60,10 @@ class Plugin {
5960
this._onChangeSettings = this._onChangeSettings.bind(this);
6061
}
6162

63+
get displayName() {
64+
return packageInfo.name;
65+
}
66+
6267
async init() {
6368
await this._deprecatedApi.init();
6469
this._core.onChangeSettings(this._onChangeSettings);

test/unit/src/Plugin.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ describe("Plugin", () => {
6161
deprecatedApiMock.restore();
6262
});
6363

64+
describe("display name", () => {
65+
it("should return package name", async () => {
66+
expect(plugin.displayName).toEqual("@mocks-server/plugin-admin-api");
67+
});
68+
});
69+
6470
describe("when initializated", () => {
6571
it("should create an express Router", async () => {
6672
await plugin.init();

0 commit comments

Comments
 (0)