mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-09 05:24:11 +00:00
13 lines
388 B
TypeScript
13 lines
388 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { normalizePackageName } from "./normalize-package-name.js";
|
|
|
|
describe("normalizePackageName", () => {
|
|
it("lowercases and replaces spaces", () => {
|
|
expect(normalizePackageName("My App")).toBe("my-app");
|
|
});
|
|
|
|
it("rejects leading dot", () => {
|
|
expect(() => normalizePackageName(".bad")).toThrow(/cannot start/);
|
|
});
|
|
});
|