Skip to content

Commit

Permalink
test: test for create and read operation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenthajeb committed Dec 1, 2023
1 parent f5bf455 commit 2114b60
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions test/invoice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,6 @@ describe("Invoice API", () => {
}
})

it("getInvoices", async () => {
try {
const response = await instanceAPI.getInvoices()
if (response.length > 0) {
sampleDatum = response[0].id
}

expect(response).toBeDefined()
} catch (error) {
console.log({
error_code: error.errorCode,
message: error.errorMessage,
status: error.status,
});

if (
!(process.env.IGNORED_ERRORCODE || []).includes(error.errorCode)
) {
throw error
}
}
})

it("getInvoiceById", async () => {
try {
const response = await instanceAPI.getInvoiceById({
Expand All @@ -89,27 +66,4 @@ describe("Invoice API", () => {
}
}
})

it("expireInvoice", async () => {
try {
const response = await instanceAPI.expireInvoice({
invoiceId: sampleDatum
})

expect(response).toBeDefined()
expect(response.status).toBe("EXPIRED")
} catch (error) {
console.log({
error_code: error.errorCode,
message: error.errorMessage,
status: error.status,
});

if (
!(process.env.IGNORED_ERRORCODE || []).includes(error.errorCode)
) {
throw error
}
}
})
})

0 comments on commit 2114b60

Please sign in to comment.