@shopify/address-mocks

Address mocks for `@shopify/address`

Usage no npm install needed!

<script type="module">
  import shopifyAddressMocks from 'https://cdn.skypack.dev/@shopify/address-mocks';
</script>

README

@shopify/address-mocks

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.