Browse Source

test(core): Fix flaky e2e test in postgres

Michael Bromley 5 years ago
parent
commit
660c93cbbd
1 changed files with 3 additions and 3 deletions
  1. 3 3
      packages/core/e2e/product.e2e-spec.ts

+ 3 - 3
packages/core/e2e/product.e2e-spec.ts

@@ -6,7 +6,7 @@ import gql from 'graphql-tag';
 import path from 'path';
 
 import { initialData } from '../../../e2e-common/e2e-initial-data';
-import { TEST_SETUP_TIMEOUT_MS, testConfig } from '../../../e2e-common/test-config';
+import { testConfig, TEST_SETUP_TIMEOUT_MS } from '../../../e2e-common/test-config';
 
 import {
     AddOptionGroupToProduct,
@@ -1069,8 +1069,8 @@ describe('Product resolver', () => {
                 });
 
                 expect(createProductVariants.length).toBe(1);
-                expect(createProductVariants[0]!.options.map(o => o.code)).toEqual(
-                    deletedVariant.options.map(o => o.code),
+                expect(createProductVariants[0]!.options.map(o => o.code).sort()).toEqual(
+                    deletedVariant.options.map(o => o.code).sort(),
                 );
             });
         });