This commit is contained in:
Mike Jolley 2020-06-26 13:01:35 +01:00 committed by GitHub
parent d25d233f27
commit c65fd05a73
7 changed files with 49 additions and 49 deletions

View File

@ -1,3 +1,20 @@
/**
* External dependencies
*/
import {
createContext,
useContext,
useState,
useReducer,
useCallback,
useEffect,
useRef,
useMemo,
} from '@wordpress/element';
import { getSetting } from '@woocommerce/settings';
import { useStoreNotices, useEmitResponse } from '@woocommerce/base-hooks';
import { useEditorContext } from '@woocommerce/base-context';
/**
* Internal dependencies
*/
@ -31,23 +48,6 @@ import {
} from './event-emit';
import { useValidationContext } from '../validation';
/**
* External dependencies
*/
import {
createContext,
useContext,
useState,
useReducer,
useCallback,
useEffect,
useRef,
useMemo,
} from '@wordpress/element';
import { getSetting } from '@woocommerce/settings';
import { useStoreNotices, useEmitResponse } from '@woocommerce/base-hooks';
import { useEditorContext } from '@woocommerce/base-context';
/**
* @typedef {import('@woocommerce/type-defs/contexts').PaymentMethodDataContext} PaymentMethodDataContext
* @typedef {import('@woocommerce/type-defs/contexts').PaymentStatusDispatch} PaymentStatusDispatch

View File

@ -1,13 +1,13 @@
/**
* Internal dependencies
*/
import { getValueForQueryKey, getValueForQueryContext } from '../selectors';
/**
* External dependencies
*/
import deepFreeze from 'deep-freeze';
/**
* Internal dependencies
*/
import { getValueForQueryKey, getValueForQueryContext } from '../selectors';
const testState = deepFreeze( {
contexta: JSON.stringify( {
foo: 'bar',

View File

@ -1,14 +1,14 @@
/**
* External dependencies
*/
import deepFreeze from 'deep-freeze';
/**
* Internal dependencies
*/
import { receiveRoutes } from '../reducers';
import { ACTION_TYPES as types } from '../action-types';
/**
* External dependencies
*/
import deepFreeze from 'deep-freeze';
describe( 'receiveRoutes', () => {
it( 'returns original state when action type is not a match', () => {
expect( receiveRoutes( undefined, { type: 'invalid' } ) ).toEqual( {} );

View File

@ -1,3 +1,9 @@
/**
* External dependencies
*/
import { Elements, useStripe } from '@stripe/react-stripe-js';
import { useState } from '@wordpress/element';
/**
* Internal dependencies
*/
@ -6,12 +12,6 @@ import { getStripeServerData } from '../stripe-utils';
import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
import { InlineCard, CardElements } from './elements';
/**
* External dependencies
*/
import { Elements, useStripe } from '@stripe/react-stripe-js';
import { useState } from '@wordpress/element';
/**
* @typedef {import('../stripe-utils/type-defs').Stripe} Stripe
* @typedef {import('../stripe-utils/type-defs').StripePaymentRequest} StripePaymentRequest

View File

@ -1,3 +1,8 @@
/**
* External dependencies
*/
import { Elements, PaymentRequestButtonElement } from '@stripe/react-stripe-js';
/**
* Internal dependencies
*/
@ -5,11 +10,6 @@ import { getStripeServerData } from '../stripe-utils';
import { useInitialization } from './use-initialization';
import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
/**
* External dependencies
*/
import { Elements, PaymentRequestButtonElement } from '@stripe/react-stripe-js';
/**
* @typedef {import('../stripe-utils/type-defs').Stripe} Stripe
* @typedef {import('../stripe-utils/type-defs').StripePaymentRequest} StripePaymentRequest

View File

@ -1,15 +1,15 @@
/**
* Internal dependencies
*/
import { normalizeLineItems } from './normalize';
import { errorTypes, errorCodes } from './constants';
/**
* External dependencies
*/
import { getSetting } from '@woocommerce/settings';
import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import { normalizeLineItems } from './normalize';
import { errorTypes, errorCodes } from './constants';
/**
* @typedef {import('./type-defs').StripeServerData} StripeServerData
* @typedef {import('./type-defs').StripePaymentItem} StripePaymentItem

View File

@ -1,13 +1,13 @@
/**
* Internal dependencies
*/
import { getSetting } from './get-setting';
/**
* External dependencies
*/
import compareVersions from 'compare-versions';
/**
* Internal dependencies
*/
import { getSetting } from './get-setting';
export * from './default-constants';
export { setSetting } from './set-setting';