Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 19 additions & 25 deletions tests/statements.spec.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
// import { Unit } from "../unit"
import { Unit } from "../unit"

import dotenv from "dotenv"
dotenv.config()
// const unit = new Unit(process.env.UNIT_TOKEN || "test", process.env.UNIT_API_URL || "test")
// const statementId: string[] = []
const unit = new Unit(process.env.UNIT_TOKEN || "test", process.env.UNIT_API_URL || "test")
const statementId: string[] = []


describe("pass", () => {
test.todo("pass")
describe("Statements List", () => {
test("Get Statements List", async () => {
const res = await unit.statements.list()
res.data.forEach(element => {
// expect(element.type === "statement").toBeTruthy()
statementId.push(element.id)
})
})
})

// describe("Statements List", () => {
// test("Get Statements List", async () => {
// const res = await unit.statements.list()
// console.log(res)
// res.data.forEach(element => {
// expect(element.type === "statement").toBeTruthy()
// statementId.push(element.id)
// })
// })
// })

// describe('Get Statement Test', () => {
// test('get each card', async () => {
// statementId.forEach(async id => {
// const res = await unit.statements.get(id)
// expect(res.data.includes("HTML")).toBeTruthy()
// });
// })
// })
describe('Get Statement Test', () => {
test('get each card', async () => {
statementId.forEach(async id => {
const res = await unit.statements.get(id)
expect(res.includes("HTML")).toBeTruthy()
});
})
})