import { describe, it } from "vitest";
import { LearningPath } from "../learningPath";
import data from "./learning_path_json.json";

describe("LearningPath.parseJson", () => {
  it("can parse learning sequences from api response", () => {
    const learningPath = LearningPath.fromJson(data, [], undefined);

    expect(learningPath.circles.length).toBe(2);
    expect(learningPath.circles[0].title).toBe("Fahrzeug");
    expect(learningPath.circles[1].title).toBe("Reisen");

    expect(learningPath.topics.length).toBe(2);
  });
});
