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

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Oct 31, 2017
1 parent cffa392 commit f24f1ff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
4 changes: 3 additions & 1 deletion packages/api-explorer-ui/__tests__/PathUrl.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ test('button click should call onSubmit', () => {
operation={new Operation({}, '/path', 'get', { operationId: '123' })}
onSubmit={onSubmit}
/>,
).find('button[type="submit"]').simulate('click');
)
.find('button[type="submit"]')
.simulate('click');

expect(called).toBe(true);
});
24 changes: 15 additions & 9 deletions packages/api-explorer-ui/__tests__/lib/Oas.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,22 @@ test('should be able to access properties on oas', () => {
});

describe('operation.getSecurity()', () => {
const security = [{ 'auth': [] }];
const security = [{ auth: [] }];

test('should return the security on this endpoint', () => {
expect(
new Oas({
info: { version: '1.0' },
paths: {
'/things': {
'post': {
post: {
security,
}
},
},
}
}).operation('/things', 'post').getSecurity(),
},
})
.operation('/things', 'post')
.getSecurity(),
).toBe(security);
});

Expand All @@ -94,11 +96,13 @@ describe('operation.getSecurity()', () => {
info: { version: '1.0' },
paths: {
'/things': {
'post': {}
post: {},
},
},
security,
}).operation('/things', 'post').getSecurity(),
})
.operation('/things', 'post')
.getSecurity(),
).toBe(security);
});

Expand All @@ -108,10 +112,12 @@ describe('operation.getSecurity()', () => {
info: { version: '1.0' },
paths: {
'/things': {
'post': {}
post: {},
},
},
}).operation('/things', 'post').getSecurity(),
})
.operation('/things', 'post')
.getSecurity(),
).toEqual([]);
});
});
Expand Down

0 comments on commit f24f1ff

Please sign in to comment.