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

Commit 9b4705e

Browse files
author
Dom Harrington
committed
Prettier fixes
1 parent f2384a3 commit 9b4705e

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

packages/api-explorer-ui/__tests__/AuthBox.test.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,15 @@ test('should merge securities auth changes', () => {
7070
const onChange = jest.fn();
7171
const authBox = mount(<AuthBox {...props} onChange={onChange} />);
7272

73-
authBox.find('ApiKey').props().change('auth')
74-
authBox.find('Oauth2').props().change('auth')
75-
76-
expect(onChange.mock.calls[0][0]).toEqual({ auth: { apiKey: 'auth' } })
77-
expect(onChange.mock.calls[1][0]).toEqual({ auth: { apiKey: 'auth', oauth: 'auth' } })
73+
authBox
74+
.find('ApiKey')
75+
.props()
76+
.change('auth');
77+
authBox
78+
.find('Oauth2')
79+
.props()
80+
.change('auth');
81+
82+
expect(onChange.mock.calls[0][0]).toEqual({ auth: { apiKey: 'auth' } });
83+
expect(onChange.mock.calls[1][0]).toEqual({ auth: { apiKey: 'auth', oauth: 'auth' } });
7884
});

packages/api-explorer-ui/src/AuthBox.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ class AuthBox extends React.Component {
4848
this.onChange = this.onChange.bind(this);
4949
}
5050
componentDidUpdate(prevProps, prevState) {
51-
if (prevState.auth !== this.state.auth) this.props.onChange({ auth: this.state.auth })
51+
if (prevState.auth !== this.state.auth) this.props.onChange({ auth: this.state.auth });
5252
}
5353
onChange(auth) {
5454
this.setState(previousState => {
5555
return {
5656
auth: Object.assign({}, previousState.auth, auth),
5757
};
58-
})
58+
});
5959
}
6060
render() {
6161
const { authInputRef, operation, onSubmit, open, needsAuth, toggle } = this.props;

packages/api-explorer-ui/src/lib/Oas.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Operation {
2929
return false;
3030
}
3131

32-
return keys.map((key) => {
32+
return keys.map(key => {
3333
let security;
3434
try {
3535
security = this.oas.components.securitySchemes[key];
@@ -56,7 +56,7 @@ class Operation {
5656
})
5757
.filter(Boolean)
5858
.reduce((prev, securities) => {
59-
securities.forEach((security) => {
59+
securities.forEach(security => {
6060
if (!prev[security.type]) prev[security.type] = [];
6161
prev[security.type].push(security.security);
6262
});

0 commit comments

Comments
 (0)