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

Commit 0731a3b

Browse files
committed
style(lint): Adapt style to new prettier version
1 parent c6867ff commit 0731a3b

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

jest.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ module.exports = {
2020
branches: 100,
2121
functions: 100,
2222
lines: 100,
23-
statements: 100
24-
}
23+
statements: 100,
24+
},
2525
},
2626

2727
// The glob patterns Jest uses to detect test files
2828
testMatch: [
2929
"<rootDir>/test/?(*.)+(spec|test).js?(x)",
30-
"<rootDir>/test/*/?(*.)+(spec|test).js?(x)"
30+
"<rootDir>/test/*/?(*.)+(spec|test).js?(x)",
3131
],
3232

3333
transform: {
34-
".js$": "babel-jest"
34+
".js$": "babel-jest",
3535
},
3636

3737
// The test environment that will be used for testing
3838
testEnvironment: "node",
3939

40-
setupFiles: ["<rootDir>/jest.init.js"]
40+
setupFiles: ["<rootDir>/jest.init.js"],
4141
};

src/methods.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ import {
55
ABOUT,
66
SETTINGS,
77
BEHAVIORS,
8-
FIXTURES
8+
FIXTURES,
99
} from "@mocks-server/admin-api-paths";
1010

1111
const DEFAULT_OPTIONS = {
1212
apiPath: DEFAULT_BASE_PATH,
13-
baseUrl: "http://localhost:3100"
13+
baseUrl: "http://localhost:3100",
1414
};
1515

1616
let configuration = {
17-
...DEFAULT_OPTIONS
17+
...DEFAULT_OPTIONS,
1818
};
1919

20-
export const config = options => {
20+
export const config = (options) => {
2121
configuration = {
2222
...configuration,
23-
...options
23+
...options,
2424
};
2525
};
2626

@@ -35,16 +35,16 @@ class Fetcher {
3535
}
3636

3737
_read() {
38-
return fetch(this.url).then(res => res.json());
38+
return fetch(this.url).then((res) => res.json());
3939
}
4040

4141
_patch(data) {
4242
return fetch(this.url, {
4343
method: "PATCH",
4444
body: JSON.stringify(data),
4545
headers: {
46-
"Content-Type": "application/json"
47-
}
46+
"Content-Type": "application/json",
47+
},
4848
});
4949
}
5050

@@ -63,12 +63,12 @@ export const settings = new Fetcher(SETTINGS);
6363

6464
export const behaviors = new Fetcher(BEHAVIORS);
6565

66-
export const behavior = name => {
66+
export const behavior = (name) => {
6767
return new Fetcher(BEHAVIORS, name);
6868
};
6969

7070
export const fixtures = new Fetcher(FIXTURES);
7171

72-
export const fixture = id => {
72+
export const fixture = (id) => {
7373
return new Fetcher(FIXTURES, id);
7474
};

test/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { about, behaviors, behavior, fixtures, fixture, settings, config } from "../index";
22

33
config({
4-
baseUrl: "http://localhost:3200"
4+
baseUrl: "http://localhost:3200",
55
});
66

77
const readAbout = () => {
@@ -12,23 +12,23 @@ const readBehaviors = () => {
1212
return behaviors.read();
1313
};
1414

15-
const readBehavior = name => {
15+
const readBehavior = (name) => {
1616
return behavior(name).read();
1717
};
1818

1919
const readFixtures = () => {
2020
return fixtures.read();
2121
};
2222

23-
const readFixture = id => {
23+
const readFixture = (id) => {
2424
return fixture(id).read();
2525
};
2626

2727
const readSettings = () => {
2828
return settings.read();
2929
};
3030

31-
const updateSettings = newSettings => {
31+
const updateSettings = (newSettings) => {
3232
return settings.update(newSettings);
3333
};
3434

@@ -39,5 +39,5 @@ module.exports = {
3939
readFixtures,
4040
readFixture,
4141
readSettings,
42-
updateSettings
42+
updateSettings,
4343
};

test/index.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
readFixtures,
66
readFixture,
77
readSettings,
8-
updateSettings
8+
updateSettings,
99
} from "./index";
1010

1111
describe("react-admin-client methods used through node", () => {
@@ -95,23 +95,23 @@ describe("react-admin-client methods used through node", () => {
9595
describe("whe updating settings", () => {
9696
it("should update current behavior", async () => {
9797
await updateSettings({
98-
behavior: "user2"
98+
behavior: "user2",
9999
});
100100
const settings = await readSettings();
101101
expect(settings.behavior).toEqual("user2");
102102
});
103103

104104
it("should update current delay", async () => {
105105
await updateSettings({
106-
delay: 1000
106+
delay: 1000,
107107
});
108108
const settings = await readSettings();
109109
expect(settings.delay).toEqual(1000);
110110
});
111111

112112
it("should update current behavior", async () => {
113113
await updateSettings({
114-
behavior: "base"
114+
behavior: "base",
115115
});
116116
const settings = await readSettings();
117117
expect(settings.behavior).toEqual("base");

0 commit comments

Comments
 (0)