-
Notifications
You must be signed in to change notification settings - Fork 115
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 #1146 from OneSignal/clean/player_references
Cleanup player references
- Loading branch information
Showing
73 changed files
with
99 additions
and
3,719 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export function expectHeaderToBeSent() { | ||
expect(window.fetch).toHaveBeenCalledWith( | ||
expect.any(String), | ||
expect.objectContaining({ | ||
headers: expect.objectContaining({ | ||
// made undercase automatically | ||
'sdk-version': expect.stringMatching(/onesignal\/web\/[0-9]+[0-9]+/), | ||
}), | ||
}), | ||
); | ||
jest.mocked(window.fetch).mock.calls.forEach((params) => { | ||
expect(typeof params[0]).toBe('string'); | ||
|
||
const requestInit = params[1] as RequestInit; | ||
const headers = requestInit.headers as Headers; | ||
expect(headers.get('sdk-version')).toMatch( | ||
new RegExp(/^onesignal\/web\/[0-9]{6}$/), | ||
); | ||
}); | ||
} |
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 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.