-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #867 from wheresrhys/rhys/relative-url-matching
Rhys/relative url matching
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 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
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 |
---|---|---|
|
@@ -23,6 +23,15 @@ describe('Spec compliance', () => { | |
), | ||
); | ||
}); | ||
it('rejects on protocol agnostic url containing credentials', async () => { | ||
await expect( | ||
fetchMock.fetchHandler('//user:[email protected]'), | ||
).rejects.toThrow( | ||
new TypeError( | ||
'Request cannot be constructed from a URL that includes credentials: //user:[email protected]/', | ||
), | ||
); | ||
}); | ||
it('reject if the request method is GET or HEAD and the body is non-null.', async () => { | ||
await expect( | ||
fetchMock.fetchHandler('http://a.com', { body: 'a' }), | ||
|