Skip to content

Commit 409cb76

Browse files
committed
chore: run formatter
1 parent 19c24f9 commit 409cb76

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

test/acceptance/fake-server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,11 @@ export const fakeServer = (basePath: string, snykToken: string): FakeServer => {
578578
);
579579

580580
app.post(basePath.replace('/v1', '') + '/oauth2/token', (req, res) => {
581-
const fake_oauth_token = "{\"access_token\":\"access_token_value\",\"token_type\":\"b\",\"expiry\":\"3023-12-20T08:49:15.504539Z\"}";
581+
const fake_oauth_token =
582+
'{"access_token":"access_token_value","token_type":"b","expiry":"3023-12-20T08:49:15.504539Z"}';
582583

583584
// client credentials grant: expecting client id = a and client secret = b
584-
if ( req.headers.authorization?.includes("Basic YTpi") ) {
585+
if (req.headers.authorization?.includes('Basic YTpi')) {
585586
res.status(200).send(fake_oauth_token);
586587
}
587588

test/jest/acceptance/auth.spec.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { fakeServer } from '../../acceptance/fake-server';
2-
import { createProjectFromWorkspace } from '../util/createProject';
32
import { runSnykCLI } from '../util/runSnykCLI';
43

54
jest.setTimeout(1000 * 60);
@@ -30,16 +29,22 @@ describe('Auth', () => {
3029
});
3130

3231
it('successfully uses oauth client credentials grant to authenticate', async () => {
33-
const {code} = await runSnykCLI(`auth --auth-type=oauth --client-id a --client-secret b`, {
34-
env,
35-
});
32+
const { code } = await runSnykCLI(
33+
`auth --auth-type=oauth --client-id a --client-secret b`,
34+
{
35+
env,
36+
},
37+
);
3638
expect(code).toEqual(0);
3739
});
3840

3941
it('fails to us oauth client credentials grant to authenticate', async () => {
40-
const {code} = await runSnykCLI(`auth --auth-type=oauth --client-id wrong --client-secret b`, {
41-
env,
42-
});
42+
const { code } = await runSnykCLI(
43+
`auth --auth-type=oauth --client-id wrong --client-secret b`,
44+
{
45+
env,
46+
},
47+
);
4348
expect(code).toEqual(2);
4449
});
45-
});
50+
});

0 commit comments

Comments
 (0)