Eager to make your unit tests a source of documentation for everyone in your company? Here comes a vitest reporter that creates documentation on Notion from your tests describes and its 🚀
You will need to setup an integration in your Notion able to write on the root page you'll have for documentation.
npm install -D @swan-io/vitest-notion-reporterimport { defineConfig, UserWorkspaceConfig } from "vitest/config";
import { NotionReporter } from "@swan-io/vitest-notion-reporter";
export default defineConfig(<UserWorkspaceConfig>{
test: {
reporters: [new NotionReporter()],
},
});export NOTION_TOKEN=<YOUR-NOTION-TOKEN>
export NOTION_PARENT_PAGE_ID=<ROOT-PAGE-FOR-DOCUMENTATION-ID>or
import { defineConfig, UserWorkspaceConfig } from "vitest/config";
import { NotionReporter } from "@swan-io/vitest-notion-reporter";
export default defineConfig(<UserWorkspaceConfig>{
test: {
reporters: [
new NotionReporter({
token: "<YOUR-NOTION-TOKEN>",
parentPageId: "<ROOT-PAGE-FOR-DOCUMENTATION-ID>",
}),
],
},
});- ⚖️ License