This is a concise summary of changes and recommendations around updating @shopify/jest-dom-mocks
in consuming projects. For a more detailed list of changes, see the changelog.
🛑 Breaking change - The fetchedUrl
from lastCall()
includes a trailing slash which may cause tests to fail.
const [fetchedUrl, {body, method, headers}] = fetch.lastCall();
expect(fetchedUrl).toBe('https://www.shopify.com');
const [fetchedUrl, {body, method, headers}] = fetch.lastCall();
expect(fetchedUrl).toBe('https://www.shopify.com/');