|
1 | 1 | import { createRequestSender } from '@bigcommerce/request-sender';
|
2 | 2 |
|
3 | 3 | import { getDefaultLogger, Logger } from '../common/log';
|
4 |
| -import { getConfig } from '../config/configs.mock'; |
5 |
| -import { getExtensions } from '../extension/extension.mock'; |
6 |
| -import { getFormFields } from '../form/form.mock'; |
7 | 4 |
|
8 |
| -import CheckoutInitialState from './checkout-initial-state'; |
9 | 5 | import CheckoutService from './checkout-service';
|
10 |
| -import { getCheckout } from './checkouts.mock'; |
11 | 6 | import createCheckoutService from './create-checkout-service';
|
12 | 7 |
|
13 | 8 | jest.mock('@bigcommerce/request-sender');
|
@@ -48,23 +43,4 @@ describe('createCheckoutService()', () => {
|
48 | 43 |
|
49 | 44 | expect(logger.warn).toHaveBeenCalled();
|
50 | 45 | });
|
51 |
| - |
52 |
| - it('creates instance with initial data', () => { |
53 |
| - const initialState: CheckoutInitialState = { |
54 |
| - config: getConfig(), |
55 |
| - formFields: getFormFields(), |
56 |
| - checkout: getCheckout(), |
57 |
| - extensions: getExtensions(), |
58 |
| - }; |
59 |
| - const checkoutService = createCheckoutService({ initialState }); |
60 |
| - const state = checkoutService.getState(); |
61 |
| - |
62 |
| - expect(checkoutService).toBeInstanceOf(CheckoutService); |
63 |
| - expect(state.data.getCheckout()).toEqual(initialState.checkout); |
64 |
| - expect(state.data.getConfig()).toEqual(initialState.config.storeConfig); |
65 |
| - expect(state.data.getCustomerAccountFields()).toEqual( |
66 |
| - initialState.formFields.customerAccount, |
67 |
| - ); |
68 |
| - expect(state.data.getExtensions()).toEqual(initialState.extensions); |
69 |
| - }); |
70 | 46 | });
|
0 commit comments