Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

619 B
Raw Blame
import { describe, expect, it } from "vite-plus/test";
import { normalizeBaseUrl } from "./normalize-base-url.js";

describe("normalizeBaseUrl", () => {
  it("strips trailing slashes", () => {
    // Arrange
    const input = "http://localhost:1337/";

    // Act
    const result = normalizeBaseUrl(input);

    // Assert
    expect(result).toBe("http://localhost:1337");
  });

  it("removes /api suffix from path", () => {
    // Arrange
    const input = "http://localhost:1337/api";

    // Act
    const result = normalizeBaseUrl(input);

    // Assert
    expect(result).toBe("http://localhost:1337");
  });
});