Skip to content

Commit

Permalink
test(core): Fix circular dependency test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Mar 8, 2024
1 parent 1579e49 commit 8d2c15d
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ import {
} from '../../testing/order-test-utils';
import { ensureConfigLoaded } from '../config-helpers';

import { DefaultProductVariantPriceCalculationStrategy } from './default-product-variant-price-calculation-strategy';

describe('DefaultProductVariantPriceCalculationStrategy', () => {
let strategy: DefaultProductVariantPriceCalculationStrategy;
let strategy: import('./default-product-variant-price-calculation-strategy').DefaultProductVariantPriceCalculationStrategy;
const inputPrice = 6543;
const productVariant = new ProductVariant({});

Expand All @@ -27,6 +25,10 @@ describe('DefaultProductVariantPriceCalculationStrategy', () => {
});

beforeEach(async () => {
// Dynamic import to avoid vitest circular dependency issue
const { DefaultProductVariantPriceCalculationStrategy } = await import(
'./default-product-variant-price-calculation-strategy.js'
);
strategy = new DefaultProductVariantPriceCalculationStrategy();
const mockInjector = {
get: () => {
Expand Down

0 comments on commit 8d2c15d

Please sign in to comment.