Add unit test to ensure credentials are sent for SVGs

Signed-off-by: Gowind <petrovgovind@gmail.com>
This commit is contained in:
Gowind
2021-06-30 22:33:45 +02:00
parent 99a2873c76
commit 103b1b6ea6
@@ -154,6 +154,9 @@ describe('addBaseUrl', () => {
await waitFor(() => {
const actualSrc = root.getElementById('x')?.getAttribute('src');
expect(expectedSrc).toEqual(actualSrc);
expect(global.fetch).toHaveBeenCalledWith(`${API_ORIGIN_URL}/test.svg`, {
credentials: 'include',
});
});
});