From 9f24db13185c1871ca1c9577ffa66ebdd080a32b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 19 Dec 2023 00:27:07 +0000 Subject: [PATCH] swap the invoiceitems order --- test/test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test.ts b/test/test.ts index 540c0859c..0a06b34e9 100644 --- a/test/test.ts +++ b/test/test.ts @@ -541,13 +541,13 @@ describe(c.blue('[TEST] api management'), () => { assert.equal(res.statusCode, 200); const stripe = new Stripe(STRIPE_SECRET); - await stripe.invoiceItems.create({ + const invoice = await stripe.invoices.create({ customer: this.previousCustomer, - price: 'price_1Lm1siCHN72mG1oKkk3Jh1JT', // test $123 one time }); - - const invoice = await stripe.invoices.create({ + await stripe.invoiceItems.create({ customer: this.previousCustomer, + price: 'price_1Lm1siCHN72mG1oKkk3Jh1JT', // test $123 one time + invoice: invoice.id, }); await stripe.invoices.finalizeInvoice(invoice.id);