Michael Bromley 5 лет назад
Родитель
Сommit
c07e0bfbcb
1 измененных файлов с 11 добавлено и 3 удалено
  1. 11 3
      packages/core/e2e/configurable-operation.e2e-spec.ts

+ 11 - 3
packages/core/e2e/configurable-operation.e2e-spec.ts

@@ -1,5 +1,10 @@
 import { pick } from '@vendure/common/lib/pick';
-import { LanguageCode, mergeConfig, ShippingEligibilityChecker } from '@vendure/core';
+import {
+    defaultShippingEligibilityChecker,
+    LanguageCode,
+    mergeConfig,
+    ShippingEligibilityChecker,
+} from '@vendure/core';
 import { createTestEnvironment } from '@vendure/testing';
 import gql from 'graphql-tag';
 import path from 'path';
@@ -40,7 +45,10 @@ describe('Configurable operations', () => {
     const { server, adminClient, shopClient } = createTestEnvironment(
         mergeConfig(testConfig, {
             shippingOptions: {
-                shippingEligibilityCheckers: [testShippingEligibilityChecker],
+                shippingEligibilityCheckers: [
+                    defaultShippingEligibilityChecker,
+                    testShippingEligibilityChecker,
+                ],
             },
         }),
     );
@@ -114,7 +122,7 @@ describe('Configurable operations', () => {
 
     it('defaultValue', async () => {
         const { shippingEligibilityCheckers } = await adminClient.query<GetCheckers.Query>(GET_CHECKERS);
-        expect(shippingEligibilityCheckers[0].args.map(pick(['name', 'defaultValue']))).toEqual([
+        expect(shippingEligibilityCheckers[1].args.map(pick(['name', 'defaultValue']))).toEqual([
             { name: 'optional', defaultValue: null },
             { name: 'required', defaultValue: 'hello' },
         ]);