fix: tests

This commit is contained in:
John Yeo
2025-08-27 17:13:58 -07:00
parent c146ae1f06
commit ad8e9dfca1
57 changed files with 1081 additions and 605 deletions

View File

@@ -4,11 +4,7 @@ import {
APIVersion,
AppEnv,
BillingInterval,
CreateFreeTrialSchema,
CusProductStatus,
FreeTrialDuration,
Organization,
organizations,
} from "@autumn/shared";
import chalk from "chalk";
import Stripe from "stripe";
@@ -19,11 +15,7 @@ import { addPrefixToProducts } from "../utils.js";
import { constructFeatureItem } from "@/utils/scriptUtils/constructItem.js";
import { TestFeature } from "tests/setup/v2Features.js";
import { constructProduct } from "@/utils/scriptUtils/createTestProducts.js";
import { addDays } from "date-fns";
import { expect } from "chai";
import { eq } from "drizzle-orm";
import { CacheManager } from "@/external/caching/CacheManager.js";
import { clearOrgCache } from "@/internal/orgs/orgUtils/clearOrgCache.js";
import { expectProductAttached } from "tests/utils/expectUtils/expectProductAttached.js";
import { attachAndExpectCorrect } from "tests/utils/expectUtils/expectAttach.js";
import { constructPriceItem } from "@/internal/products/product-items/productItemUtils.js";