Skip to content

Commit

Permalink
fix: pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Aug 14, 2023
1 parent 58c135b commit 2a63810
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/api/test/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,18 @@ describe('#auth()', () => {
});

describe('quirks', () => {
let authQuirksOas;
let quirks;

beforeAll(async () => {
const authQuirksOas = await loadSpec(require.resolve('./__fixtures__/definitions/auth-quirks.json'));
authQuirksOas = await loadSpec(require.resolve('./__fixtures__/definitions/auth-quirks.json'));
quirks = api(authQuirksOas as unknown as OASDocument);
});

// Because the `POST /anything` operation allows either an OAuth2 token or Basic Auth the
// quirks case we're testing is that you should be able to supply either a single OAuth2 token
// or a username+password and it should be able to intelligently handle both.
// eslint-disable-next-line vitest/no-standalone-expect
// Because the `POST /anything` operation allows either an OAuth2 token or Basic Auth the
// quirks case we're testing is that you should be able to supply either a single OAuth2 token
// or a username+password and it should be able to intelligently handle both.
it('should have an expected security setting definition for this quirks case', () => {
expect(authQuirksOas.paths['/anything'].post.security).toStrictEqual([
{ oauth2: ['write:things'] },
{ basicAuth: [] },
Expand Down

0 comments on commit 2a63810

Please sign in to comment.