Skip to content

Commit 8d1ef97

Browse files
style: apply Prettier to credentials lock changes
1 parent 80bb450 commit 8d1ef97

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

src/lib/config.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ describe('loadConfig', () => {
2222
});
2323

2424
it('honors TESTSPRITE_API_URL over the file', async () => {
25-
await writeProfile('default', { apiUrl: 'https://from-file.example.com' }, { path: credentialsPath });
25+
await writeProfile(
26+
'default',
27+
{ apiUrl: 'https://from-file.example.com' },
28+
{ path: credentialsPath },
29+
);
2630
const config = loadConfig({
2731
env: { TESTSPRITE_API_URL: 'https://from-env.example.com' },
2832
credentialsPath,

src/lib/credentials.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ describe('writeProfile', () => {
118118

119119
it('preserves other profiles when updating one', async () => {
120120
await writeProfile('default', { apiKey: 'sk-d' }, { path: credentialsPath });
121-
await writeProfile('dev', { apiKey: 'sk-dev', apiUrl: 'https://dev' }, { path: credentialsPath });
121+
await writeProfile(
122+
'dev',
123+
{ apiKey: 'sk-dev', apiUrl: 'https://dev' },
124+
{ path: credentialsPath },
125+
);
122126
await writeProfile('default', { apiUrl: 'https://prod' }, { path: credentialsPath });
123127

124128
const file = readCredentialsFile({ path: credentialsPath });
@@ -261,9 +265,9 @@ describe('assertValidProfileName / profile-name guard', () => {
261265
});
262266

263267
it('writeProfile rejects a malformed name and does NOT create the file', async () => {
264-
await expect(writeProfile('prod]', { apiKey: 'sk-1' }, { path: credentialsPath })).rejects.toThrow(
265-
ApiError,
266-
);
268+
await expect(
269+
writeProfile('prod]', { apiKey: 'sk-1' }, { path: credentialsPath }),
270+
).rejects.toThrow(ApiError);
267271
expect(existsSync(credentialsPath)).toBe(false);
268272
});
269273

src/lib/credentials.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,5 +273,3 @@ function isStaleCredentialsLock(lockPath: string): boolean {
273273
return false;
274274
}
275275
}
276-
277-

0 commit comments

Comments
 (0)