Skip to content

Commit

Permalink
test: add test for assertValidPackageName
Browse files Browse the repository at this point in the history
  • Loading branch information
velut committed Apr 12, 2024
1 parent 19cfe68 commit 9e8787b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/assert-valid-package-name.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { expect, test } from "vitest";
import { assertValidPackageName } from "./assert-valid-package-name";

test("assertValidPackageName", () => {
expect(() => assertValidPackageName("")).toThrow();
expect(() => assertValidPackageName("foo")).not.toThrow();
expect(() => assertValidPackageName("@foo/bar")).not.toThrow();
});

0 comments on commit 9e8787b

Please sign in to comment.