This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(copy): add support for copying
Blob
objects
Although `copy()` does not need to (and never will) support all kinds of objects, there is a (not uncommon) usecase for supporting `Blob` objects: `ngMock`'s `$httpBackend` will return a copy of the response data (so that changes in one test won't affect others). Since returning `Blob` objects in response to HTTP requests is a valid usecase and since `ngMocks`'s `$httpBackend` will use `copy()` to create a copy of that data, it is reasonable to support `Blob` objects. (I didn't run any benchmarks, but the additional check for the type of the copied element should have negligible impact, compared to the other stuff that `copy()` is doing.) Fixes #9669 Closes #14064
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 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
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