Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion tests/test_chain.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { jest, describe, it, expect, beforeEach, afterEach } from "@jest/globals";
import { main } from "../ddss/chain.ts";
import { Fact, Idea } from "../ddss/orm.ts";
import { Fact } from "../ddss/orm.ts";
import { createTempDb } from "./utils.ts";

describe("chain", () => {
Expand Down
12 changes: 6 additions & 6 deletions tests/test_dump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ describe("dump", () => {

it("test_dump_facts_correctly", async () => {
await Fact.create({ data: "a\n----\nb\n" });
await main(addr, sequelize);
await main(sequelize);
expect(getCapturedOutput()).toContain("fact: a => b");
});

it("test_dump_ideas_correctly", async () => {
await Idea.create({ data: "x\n----\ny\n" });
await main(addr, sequelize);
await main(sequelize);
expect(getCapturedOutput()).toContain("idea: x => y");
});

Expand All @@ -45,7 +45,7 @@ describe("dump", () => {
await Idea.create({ data: "x\n----\ny\n" });
await Idea.create({ data: "p\n----\nq\n" });

await main(addr, sequelize);
await main(sequelize);

const output = getCapturedOutput();
expect(output).toContain("idea: x => y");
Expand All @@ -55,15 +55,15 @@ describe("dump", () => {
});

it("test_dump_empty_database", async () => {
await main(addr, sequelize);
await main(sequelize);
expect(getCapturedOutput().trim()).toBe("");
});

it("test_dump_order", async () => {
await Fact.create({ data: "a\n----\nb\n" });
await Idea.create({ data: "x\n----\ny\n" });

await main(addr, sequelize);
await main(sequelize);

const output = getCapturedOutput();
const ideaPos = output.indexOf("idea: x => y");
Expand All @@ -76,7 +76,7 @@ describe("dump", () => {

it("test_dump_with_simple_fact", async () => {
await Fact.create({ data: "----\nsimple\n" });
await main(addr, sequelize);
await main(sequelize);
expect(getCapturedOutput()).toContain("fact: => simple");
});
});
Loading