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

Commit

Permalink
Remove SUPPORTED_LOCALES from address-consts since it was used only i…
Browse files Browse the repository at this point in the history
…n tests
  • Loading branch information
plentz committed Jul 27, 2020
1 parent c3baa5f commit 211bf11
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
13 changes: 0 additions & 13 deletions packages/address-consts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,3 @@ export const HEADERS = {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*',
};

export const SUPPORTED_LOCALES = [
'DA',
'DE',
'EN',
'ES',
'FR',
'IT',
'JA',
'NL',
'PT',
'PT_BR',
];
18 changes: 15 additions & 3 deletions packages/address-mocks/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {GRAPHQL_ENDPOINT, SUPPORTED_LOCALES} from '@shopify/address-consts';
import {GRAPHQL_ENDPOINT} from '@shopify/address-consts';
import {fetch} from '@shopify/jest-dom-mocks';

import {fixtures} from './fixtures';
Expand All @@ -11,8 +11,20 @@ interface Options {
}

export function mockCountryRequests() {
const unsupportedLocales = ['AF'];
SUPPORTED_LOCALES.concat(unsupportedLocales).map(locale => {
const locales = [
'AF',
'DA',
'DE',
'EN',
'ES',
'FR',
'IT',
'JA',
'NL',
'PT',
'PT_BR',
];
locales.concat(locales).map(locale => {
['countries', 'country'].map(operationName => {
fetch.mock(
(url: string, options: Options) => {
Expand Down

0 comments on commit 211bf11

Please sign in to comment.