Skip to content

Commit 9489810

Browse files
committed
Add unit test
1 parent 0656303 commit 9489810

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/src/index.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { describe, test } from "vitest";
2+
import { autoLinkMd } from "../src";
3+
4+
describe("react-markdown-autolink", () => {
5+
test("test autolink", ({ expect }) => {
6+
expect(autoLinkMd("this is a link: google.com")).toBe("this is a link: <google.com>");
7+
});
8+
});

lib/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default defineConfig({
1212
},
1313
},
1414
test: {
15-
environment: "jsdom",
15+
environment: "node",
1616
globals: true,
1717
setupFiles: [],
1818
coverage: {

0 commit comments

Comments
 (0)