mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
chore: Linear integration fixes (#9538)
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
parseAPIErrorResponse,
|
||||
setLoadingStatus,
|
||||
throwErrorMessage,
|
||||
parseLinearAPIErrorResponse,
|
||||
} from '../api';
|
||||
|
||||
describe('#getLoadingStatus', () => {
|
||||
@@ -49,3 +50,26 @@ describe('#throwErrorMessage', () => {
|
||||
expect(errorFn).toThrow('Error Message [message]');
|
||||
});
|
||||
});
|
||||
|
||||
describe('#parseLinearAPIErrorResponse', () => {
|
||||
it('returns correct values', () => {
|
||||
expect(
|
||||
parseLinearAPIErrorResponse(
|
||||
{
|
||||
response: {
|
||||
data: {
|
||||
error: {
|
||||
errors: [
|
||||
{
|
||||
message: 'Error Message [message]',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'Default Message'
|
||||
)
|
||||
).toBe('Error Message [message]');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user