diff --git a/test/index.test.ts b/test/index.test.ts index 0f07907..e94f187 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -2,24 +2,26 @@ import { expect, it, describe } from "vitest"; import { extractJSDoc } from "../src"; describe("unjsdoc", () => { - it("should extract jsdoc", () => { - const jsdoc = extractJSDoc("../playground", "hasJSDoc"); - expect(jsdoc[0]).toMatchSnapshot(` - /** - * Test function with JSDoc - * @param test - * @param test2 - * @returns {number} - */`); - }); - it("should return null for non-existent jsdoc", () => { - const jsdoc = extractJSDoc("../playground", "noJSDoc"); - // eslint-disable-next-line unicorn/no-null - expect(jsdoc).toEqual(null); - }); - it("should return null for non-existent function", () => { - const jsdoc = extractJSDoc("../playground", "noFunction"); - // eslint-disable-next-line unicorn/no-null - expect(jsdoc).toEqual(null); + describe("extractJSDoc", () => { + it("should extract jsdoc", () => { + const jsdoc = extractJSDoc("../playground", "hasJSDoc"); + expect(jsdoc[0]).toMatchSnapshot(` + /** + * Test function with JSDoc + * @param test + * @param test2 + * @returns {number} + */`); + }); + it("should return null for non-existent jsdoc", () => { + const jsdoc = extractJSDoc("../playground", "noJSDoc"); + // eslint-disable-next-line unicorn/no-null + expect(jsdoc).toEqual(null); + }); + it("should return null for non-existent function", () => { + const jsdoc = extractJSDoc("../playground", "noFunction"); + // eslint-disable-next-line unicorn/no-null + expect(jsdoc).toEqual(null); + }); }); });