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

Commit 1693135

Browse files
authored
Merge pull request #4 from mocks-server/v1.0.2
V1.0.2
2 parents dc7099c + 37748d6 commit 1693135

File tree

7 files changed

+31
-24
lines changed

7 files changed

+31
-24
lines changed

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"@babel/env"
4+
]
5+
}

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"node": true
44
},
55
"parserOptions": {
6-
"ecmaVersion": "2018"
6+
"ecmaVersion": "2018",
7+
"sourceType": "module"
78
},
89
"plugins": ["prettier"],
910
"rules": {

CHANGELOG.md

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

13+
## [1.0.2] - 2019-12-25
14+
### Fixed
15+
- Fix export format
16+
1317
## [1.0.1] - 2019-12-24
1418
### Fixed
1519
- Fix README badges

index.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
const PATHS = {
2-
DEFAULT_BASE_PATH: "/admin",
3-
SETTINGS: "/settings",
4-
BEHAVIORS: "/behaviors",
5-
FIXTURES: "/fixtures",
6-
ABOUT: "/about"
7-
};
8-
9-
module.exports = PATHS;
1+
export const DEFAULT_BASE_PATH = "/admin";
2+
export const SETTINGS = "/settings";
3+
export const BEHAVIORS = "/behaviors";
4+
export const FIXTURES = "/fixtures";
5+
export const ABOUT = "/about";

package-lock.json

Lines changed: 7 additions & 7 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mocks-server/admin-api-paths",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Api paths of @mocks-server/plugin-admin-api",
55
"keywords": [
66
"mocks-server-plugin",
@@ -31,6 +31,7 @@
3131
},
3232
"devDependencies": {
3333
"@babel/preset-env": "^7.7.7",
34+
"babel-jest": "^24.9.0",
3435
"coveralls": "^3.0.7",
3536
"eslint": "6.6.0",
3637
"eslint-config-prettier": "6.5.0",

test/index.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
const index = require("../index");
1+
import { DEFAULT_BASE_PATH, SETTINGS, BEHAVIORS, FIXTURES, ABOUT } from "../index";
22

33
describe("Exported paths", () => {
44
it("should contain the default api base path", () => {
5-
expect(index.DEFAULT_BASE_PATH).toBeDefined();
5+
expect(DEFAULT_BASE_PATH).toBeDefined();
66
});
77

88
it("should contain the settings path", () => {
9-
expect(index.SETTINGS).toBeDefined();
9+
expect(SETTINGS).toBeDefined();
1010
});
1111

1212
it("should contain the behaviors path", () => {
13-
expect(index.BEHAVIORS).toBeDefined();
13+
expect(BEHAVIORS).toBeDefined();
1414
});
1515

1616
it("should contain the fixtures path", () => {
17-
expect(index.FIXTURES).toBeDefined();
17+
expect(FIXTURES).toBeDefined();
1818
});
1919

2020
it("should contain the about path", () => {
21-
expect(index.ABOUT).toBeDefined();
21+
expect(ABOUT).toBeDefined();
2222
});
2323
});

0 commit comments

Comments
 (0)