test: fixed a few tests

This commit is contained in:
John Yeo
2025-06-18 13:33:08 +01:00
parent 5355c8ff79
commit 16c1900064
6 changed files with 15 additions and 11 deletions

View File

@@ -14,7 +14,12 @@ git checkout -b feature/your-feature-name
git checkout -b fix/your-bug-fix
```
3. Commit Your changes with clear, descriptive messages
3. Commit your changes with clear, descriptive messages (you can use [commitizen](https://www.npmjs.com/package/commitizen) to help with this):
```bash
git commit -m "docs: added new code snippet to concepts.md"
# or
git commit -m "fix: fixed rounding error on priceUtils.ts"
```
4. Fetch the latest updated repo and merge with your changes
```bash
@@ -74,8 +79,8 @@ Use this approach if you prefer to configure your own database or tunneling solu
2. Copy `vite/.env.example` to `vite/.env`
3. Run the Docker command from Step 3 above
---
### Database Management
## Database Management
Autumn uses Postgres as it's database solution, and Drizzle ORM to manage our queries / migrations.
Our cloud offering uses Supabase to host Postgres, but you can use any hosting solution you'd like. At the moment, our docker compose does not spin up a database for you, so you'll have to do this yourself (we help you set up Supabase super easily in our set up script).

View File

@@ -99,6 +99,8 @@ await track({
**Support** 💬: If you need any type of support, we're typically most responsive on our [Discord channel](https://discord.gg/STqxY92zuS), but feel free to email us `hey@useautumn.com` too!
<!-- ## Congratulations!
You've embedded a full billing system into your application within a few minutes. You can make any pricing model changes you need, or handle custom plans without needing to alter your codebase.

View File

@@ -191,7 +191,7 @@ describe(`${chalk.yellowBright(
feature_id: features.metered1.id,
});
await timeout(3000);
await timeout(5000);
await autumn.attach({
customer_id: customerId,

View File

@@ -1,6 +1,6 @@
import { AutumnInt } from "@/external/autumn/autumnCli.js";
import { initCustomer } from "@/utils/scriptUtils/initCustomer.js";
import { assert, expect } from "chai";
import { expect } from "chai";
import chalk from "chalk";
import { setupBefore } from "tests/before.js";
import { AutumnCli } from "tests/cli/AutumnCli.js";
@@ -8,10 +8,7 @@ import { features, products } from "tests/global.js";
import { compareMainProduct } from "tests/utils/compare.js";
import { completeCheckoutForm } from "tests/utils/stripeUtils.js";
import { timeout } from "tests/utils/genUtils.js";
import {
constructProduct,
constructRawProduct,
} from "@/utils/scriptUtils/createTestProducts.js";
import { constructRawProduct } from "@/utils/scriptUtils/createTestProducts.js";
import { constructPrepaidItem } from "@/utils/scriptUtils/constructItem.js";
import { createProducts } from "tests/utils/productUtils.js";

View File

@@ -150,7 +150,7 @@ describe(`${chalk.yellowBright(`${testCase}: Testing upgrades with prepaid singl
stripeCli,
testClockId,
advanceTo: addWeeks(curUnix, 1).getTime(),
waitForSeconds: 10,
waitForSeconds: 30,
});
await runAttachTest({

View File

@@ -132,7 +132,7 @@ describe(`${chalk.yellowBright(`contUse/${testCase}: Testing create / delete ent
stripeCli,
testClockId,
advanceTo: addWeeks(new Date(), 2).getTime(),
waitForSeconds: 10,
waitForSeconds: 30,
});
await autumn.entities.create(customerId, entities);