Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Latest commit

 

History

History

address-mocks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@shopify/address-mocks

Caution

@shopify/address-mocks is deprecated.

Shopifolk, see Shopify/quilt-internal for information on the latest packages available for use internally.

Build Status Build Status License: MIT npm version npm bundle size (minified + gzip)

Address mocks for @shopify/address.

Installation

yarn add @shopify/address-mocks

Testing

If your component uses the @shopify/address package and you want to mock API calls, you can use the following:

import {fetch} from '@shopify/jest-dom-mocks';
import {mockCountryRequests} from '@shopify/address-mocks';

beforeEach(mockCountryRequests);
afterEach(fetch.restore);

Note: Only FR / JA and EN are mocked.