-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upload-client): export
UploadcareNetworkError
was renamed to t…
…he `NetworkError` `UploadcareNetworkError` is deprecated but still available. `error.name` is also changed from `UploadcareNetworkError` to `NetworkError`
- Loading branch information
Showing
8 changed files
with
30 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { NetworkError } from './NetworkError' | ||
|
||
describe('NetworkError', () => { | ||
it('should work', () => { | ||
const progressEvent = new Event('ProgressEvent') as ProgressEvent | ||
const error = new NetworkError(progressEvent) | ||
expect(error.name).toBe('NetworkError') | ||
expect(error.message).toBe('Network error') | ||
expect(error instanceof NetworkError).toBeTruthy() | ||
expect(error.originalProgressEvent).toBe(progressEvent) | ||
}) | ||
}) |
6 changes: 3 additions & 3 deletions
6
...lient-utils/src/UploadcareNetworkError.ts → ...ages/api-client-utils/src/NetworkError.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
packages/api-client-utils/src/UploadcareNetworkError.test.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters