From 2a63810063bf6d77685b21a91e02d5dc2c603902 Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Mon, 14 Aug 2023 08:41:25 -0700 Subject: [PATCH] fix: pr feedback --- packages/api/test/auth.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/api/test/auth.test.ts b/packages/api/test/auth.test.ts index 5c2361ea..50b68ffd 100644 --- a/packages/api/test/auth.test.ts +++ b/packages/api/test/auth.test.ts @@ -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: [] },