Skip to content

Commit bcb6827

Browse files
committed
Update test expectations for improved error messages
1 parent 4e51a89 commit bcb6827

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

test/json-parsing-edge-cases.test.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('JSON Parsing Edge Cases', () => {
5050
await expect(getResponseJson(mockResponse)).rejects.toThrow(
5151
expect.objectContaining({
5252
name: 'SyntaxError',
53-
message: 'Unknown error',
53+
message: 'Unknown JSON parsing error',
5454
originalResponse: responseBody,
5555
}),
5656
)

test/quota-utils-error-handling.test.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('Quota Utils - Error Handling', () => {
2727
const { getQuotaCost } = await import('../src/quota-utils')
2828

2929
expect(() => getQuotaCost('someMethod')).toThrow(
30-
'Failed to load requirements.json',
30+
'Failed to load "requirements.json"',
3131
)
3232
})
3333

@@ -40,7 +40,7 @@ describe('Quota Utils - Error Handling', () => {
4040
const { getQuotaCost } = await import('../src/quota-utils')
4141

4242
expect(() => getQuotaCost('someMethod')).toThrow(
43-
'Failed to load requirements.json',
43+
'Failed to load "requirements.json"',
4444
)
4545
})
4646
})
@@ -61,7 +61,7 @@ describe('Quota Utils - Error Handling', () => {
6161
const { getMethodRequirements } = await import('../src/quota-utils')
6262

6363
expect(() => getMethodRequirements('missingMethod')).toThrow(
64-
'Unknown SDK method: missingMethod',
64+
'Unknown SDK method: "missingMethod"',
6565
)
6666
})
6767

@@ -80,7 +80,7 @@ describe('Quota Utils - Error Handling', () => {
8080
const { getRequiredPermissions } = await import('../src/quota-utils')
8181

8282
expect(() => getRequiredPermissions('missingMethod')).toThrow(
83-
'Unknown SDK method: missingMethod',
83+
'Unknown SDK method: "missingMethod"',
8484
)
8585
})
8686
})

test/quota-utils.test.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Quota Utils', () => {
3535

3636
it('should throw error for unknown method', () => {
3737
expect(() => getQuotaCost('unknownMethod')).toThrow(
38-
'Unknown SDK method: unknownMethod',
38+
'Unknown SDK method: "unknownMethod"',
3939
)
4040
})
4141
})
@@ -66,7 +66,7 @@ describe('Quota Utils', () => {
6666

6767
it('should throw error for unknown method', () => {
6868
expect(() => getRequiredPermissions('unknownMethod')).toThrow(
69-
'Unknown SDK method: unknownMethod',
69+
'Unknown SDK method: "unknownMethod"',
7070
)
7171
})
7272
})

0 commit comments

Comments
 (0)