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

@@ -83,7 +83,7 @@ describe(`${chalk.yellowBright(`${testCase}: Testing migration for pro -> pro wi
testClockId = testClockId1!;
});
it("should attach free product", async function () {
it("should attach pro product", async function () {
await attachAndExpectCorrect({
autumn,
customerId,

View File

@@ -14,6 +14,7 @@ import { isFreeProductV2 } from "@/internal/products/productUtils/classifyProduc
import { expectTrialEndsAtCorrect } from "tests/utils/expectUtils/expectAttach/expectTrialEndsAt.js";
import { timeout } from "@/utils/genUtils.js";
import { subToPeriodStartEnd } from "@/external/stripe/stripeSubUtils/convertSubUtils.js";
import { expectSubToBeCorrect } from "tests/merged/mergeUtils/expectSubCorrect.js";
export const expectSubsSame = ({
subsBefore,
@@ -111,6 +112,15 @@ export const runMigrationTest = async ({
env,
});
if (!isFreeProductV2({ product: toProduct })) {
await expectSubToBeCorrect({
db,
customerId,
org,
env,
});
}
// if (!isFreeProductV2({ product: toProduct })) {
// expect(cusAfter.invoices.length).to.equal(numInvoices);
// }