mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-24 06:48:46 +00:00
test(create): vitest and package name normalization
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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/);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user